From 3fa591d4b43316e7b7f8d46781793d96893d3374 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 24 Jun 2014 16:44:17 +0100 Subject: [PATCH] functexcept.h (__throw_out_of_range_fmt): Change attribute to __gnu_printf__ archetype to prevent warnings for "%zu". * include/bits/functexcept.h (__throw_out_of_range_fmt): Change attribute to __gnu_printf__ archetype to prevent warnings for "%zu". * include/bits/locale_facets_nonio.tcc (time_get::do_get_weekday): Remove unused typedef. (time_get::do_get_monthname): Likewise. * include/bits/stl_tree.h: Add system_header pragma. * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): Remove redundant const-qualifier. * include/std/complex (complex::__rep): Use _GLIBCXX_CONSTEXPR macro instead of _GLIBCXX_USE_CONSTEXPR. From-SVN: r211951 --- libstdc++-v3/ChangeLog | 13 +++++++++++++ libstdc++-v3/include/bits/functexcept.h | 2 +- libstdc++-v3/include/bits/locale_facets_nonio.tcc | 2 -- libstdc++-v3/include/bits/stl_tree.h | 2 ++ libstdc++-v3/include/ext/stdio_sync_filebuf.h | 2 +- libstdc++-v3/include/std/complex | 8 ++++---- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d3c01f55d9a..864f7b219e6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2014-06-24 Jonathan Wakely + + * include/bits/functexcept.h (__throw_out_of_range_fmt): Change + attribute to __gnu_printf__ archetype to prevent warnings for "%zu". + * include/bits/locale_facets_nonio.tcc (time_get::do_get_weekday): + Remove unused typedef. + (time_get::do_get_monthname): Likewise. + * include/bits/stl_tree.h: Add system_header pragma. + * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): Remove + redundant const-qualifier. + * include/std/complex (complex::__rep): Use _GLIBCXX_CONSTEXPR macro + instead of _GLIBCXX_USE_CONSTEXPR. + 2014-06-23 Jonathan Wakely * include/bits/parse_numbers.h (_Number_help): Fix divide-by-zero. diff --git a/libstdc++-v3/include/bits/functexcept.h b/libstdc++-v3/include/bits/functexcept.h index b8359f91f57..48be255a8e1 100644 --- a/libstdc++-v3/include/bits/functexcept.h +++ b/libstdc++-v3/include/bits/functexcept.h @@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) - __attribute__((__format__(__printf__, 1, 2))); + __attribute__((__format__(__gnu_printf__, 1, 2))); void __throw_runtime_error(const char*) __attribute__((__noreturn__)); diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index 41d944d3e7d..c9f8dac1d1d 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -1064,7 +1064,6 @@ _GLIBCXX_END_NAMESPACE_LDBL do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { - typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); @@ -1092,7 +1091,6 @@ _GLIBCXX_END_NAMESPACE_LDBL do_get_monthname(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { - typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index ce43ab84686..cc9bf9442ea 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -58,6 +58,8 @@ #ifndef _STL_TREE_H #define _STL_TREE_H 1 +#pragma GCC system_header + #include #include #include diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h index 5ca16ebac46..73283a74b9f 100644 --- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h @@ -84,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Note that there is no way for the library to track what you do * with the file, so be careful. */ - std::__c_file* const + std::__c_file* file() { return this->_M_file; } protected: diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 5849cd5e806..1ae6c4580c7 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -217,7 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template complex<_Tp>& operator/=(const complex<_Up>&); - _GLIBCXX_USE_CONSTEXPR complex __rep() const + _GLIBCXX_CONSTEXPR complex __rep() const { return *this; } private: @@ -1180,7 +1180,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - _GLIBCXX_USE_CONSTEXPR _ComplexT __rep() const { return _M_value; } + _GLIBCXX_CONSTEXPR _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value; @@ -1330,7 +1330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - _GLIBCXX_USE_CONSTEXPR _ComplexT __rep() const { return _M_value; } + _GLIBCXX_CONSTEXPR _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value; @@ -1482,7 +1482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - _GLIBCXX_USE_CONSTEXPR _ComplexT __rep() const { return _M_value; } + _GLIBCXX_CONSTEXPR _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value;