PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1883b40a07
commit
45bae0b7dc
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -232,12 +232,13 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
|
||||
*/
|
||||
|
||||
#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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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++" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user