[cfe-commits] [libcxx] r171202 - /libcxx/trunk/src/locale.cpp
Richard Smith
richard at metafoo.co.uk
Sun Dec 30 00:53:03 PST 2012
On Fri, Dec 28, 2012 at 10:15 AM, Howard Hinnant <hhinnant at apple.com> wrote:
> Author: hhinnant
> Date: Fri Dec 28 12:15:01 2012
> New Revision: 171202
>
> URL: http://llvm.org/viewvc/llvm-project?rev=171202&view=rev
> Log:
> Saleem Abdulrasool: GCC complains about the template functions as potentially not being able to be
> inlined. These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace.
> Also simplified use of the Wmissing-field-initializers pragma as was done for clang.
>
> Modified:
> libcxx/trunk/src/locale.cpp
>
> Modified: libcxx/trunk/src/locale.cpp
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=171202&r1=171201&r2=171202&view=diff
> ==============================================================================
> --- libcxx/trunk/src/locale.cpp (original)
> +++ libcxx/trunk/src/locale.cpp Fri Dec 28 12:15:01 2012
> @@ -82,7 +82,7 @@
> }
>
> template <typename T, size_t N>
> -_LIBCPP_ALWAYS_INLINE
> +inline
> _LIBCPP_CONSTEXPR
> size_t
> countof(const T (&)[N])
> @@ -91,7 +91,7 @@
> }
>
> template <typename T>
> -_LIBCPP_ALWAYS_INLINE
> +inline
> _LIBCPP_CONSTEXPR
> size_t
> countof(const T * const begin, const T * const end)
> @@ -224,10 +224,10 @@
> #endif // _LIBCPP_NO_EXCEPTIONS
> }
>
> -// NOTE(saleem) avoid the `base class should be explicitly initialized in the
> +// NOTE avoid the `base class should be explicitly initialized in the
> // copy constructor` warning emitted by GCC
> -#pragma GCC diagnostic ignored "-Wextra"
> #pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wextra"
>
> locale::__imp::__imp(const __imp& other)
> : facets_(max<size_t>(N, other.facets_.size())),
> @@ -4603,15 +4603,13 @@
> }
>
> #pragma clang diagnostic ignored "-Wmissing-field-initializers"
> +#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
You don't need both of these: Clang understands "#pragma GCC diagnostic".
More information about the cfe-commits
mailing list