[libcxx] r249788 - PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 17:26:50 PDT 2015
Author: rsmith
Date: Thu Oct 8 19:26:50 2015
New Revision: 249788
URL: http://llvm.org/viewvc/llvm-project?rev=249788&view=rev
Log:
PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
Modified:
libcxx/trunk/include/complex.h
libcxx/trunk/include/cstddef
libcxx/trunk/include/ctype.h
libcxx/trunk/include/errno.h
libcxx/trunk/include/float.h
libcxx/trunk/include/inttypes.h
libcxx/trunk/include/math.h
libcxx/trunk/include/setjmp.h
libcxx/trunk/include/stddef.h
Modified: libcxx/trunk/include/complex.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/complex.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/complex.h (original)
+++ libcxx/trunk/include/complex.h Thu Oct 8 19:26:50 2015
@@ -18,6 +18,12 @@
*/
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
#ifdef __cplusplus
#include <ccomplex>
@@ -28,8 +34,4 @@
#endif // __cplusplus
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
#endif // _LIBCPP_COMPLEX_H
Modified: libcxx/trunk/include/cstddef
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstddef?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/cstddef (original)
+++ libcxx/trunk/include/cstddef Thu Oct 8 19:26:50 2015
@@ -34,14 +34,15 @@ Types:
*/
#include <__config>
-// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
-#include_next <stddef.h>
-#include <__nullptr>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
+#include_next <stddef.h>
+#include <__nullptr>
+
_LIBCPP_BEGIN_NAMESPACE_STD
using ::ptrdiff_t;
Modified: libcxx/trunk/include/ctype.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/ctype.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/ctype.h (original)
+++ libcxx/trunk/include/ctype.h Thu Oct 8 19:26:50 2015
@@ -31,12 +31,13 @@ int toupper(int c);
*/
#include <__config>
-#include_next <ctype.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <ctype.h>
+
#ifdef __cplusplus
#if defined(_LIBCPP_MSVCRT)
Modified: libcxx/trunk/include/errno.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/errno.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/errno.h (original)
+++ libcxx/trunk/include/errno.h Thu Oct 8 19:26:50 2015
@@ -24,12 +24,13 @@ Macros:
*/
#include <__config>
-#include_next <errno.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <errno.h>
+
#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
#ifdef ELAST
Modified: libcxx/trunk/include/float.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/float.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/float.h (original)
+++ libcxx/trunk/include/float.h Thu Oct 8 19:26:50 2015
@@ -61,12 +61,13 @@ Macros:
*/
#include <__config>
-#include_next <float.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <float.h>
+
#ifndef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif
Modified: libcxx/trunk/include/inttypes.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/inttypes.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/inttypes.h (original)
+++ libcxx/trunk/include/inttypes.h Thu Oct 8 19:26:50 2015
@@ -232,12 +232,13 @@ uintmax_t wcstoumax(const wchar_t* restr
*/
#include <__config>
-#include_next <inttypes.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <inttypes.h>
+
#ifdef __cplusplus
#include <stdint.h>
Modified: libcxx/trunk/include/math.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/math.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/math.h (original)
+++ libcxx/trunk/include/math.h Thu Oct 8 19:26:50 2015
@@ -293,12 +293,13 @@ long double truncl(long double x);
*/
#include <__config>
-#include_next <math.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <math.h>
+
#ifdef __cplusplus
// We support including .h headers inside 'extern "C"' contexts, so switch
Modified: libcxx/trunk/include/setjmp.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/setjmp.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/setjmp.h (original)
+++ libcxx/trunk/include/setjmp.h Thu Oct 8 19:26:50 2015
@@ -27,12 +27,13 @@ void longjmp(jmp_buf env, int val);
*/
#include <__config>
-#include_next <setjmp.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <setjmp.h>
+
#ifndef setjmp
#define setjmp(env) setjmp(env)
#endif
Modified: libcxx/trunk/include/stddef.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/stddef.h?rev=249788&r1=249787&r2=249788&view=diff
==============================================================================
--- libcxx/trunk/include/stddef.h (original)
+++ libcxx/trunk/include/stddef.h Thu Oct 8 19:26:50 2015
@@ -10,6 +10,11 @@
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
#include_next <stddef.h>
#elif !defined(_LIBCPP_STDDEF_H)
@@ -33,12 +38,13 @@ Types:
*/
#include <__config>
-#include_next <stddef.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+#include_next <stddef.h>
+
#ifdef __cplusplus
extern "C++" {
More information about the cfe-commits
mailing list