]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite,objective-c++: Fix imported NSObjCRuntime.h.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 23 Jun 2023 14:29:14 +0000 (15:29 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 23 Jun 2023 14:36:20 +0000 (15:36 +0100)
We have imported some headers from the GNUStep project to allow us
to maintain the testsuite independent to changing versions of system
headers.

One of these headers has a macro that (now we have support for
__has_feature) expands to a declaration that triggers a warning.

These headers are considered part of the implementation so that, in
this case, we can suppress the warning with the system_header pragma.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/ChangeLog:

* objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: Make
this header use pragma system_header.

gcc/testsuite/objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h

index 189af80436ab4b02c950e79c82486269fb627e57..62556f9ac88b28194a7b7ab74ebb759827c1c28f 100644 (file)
@@ -29,6 +29,9 @@
 #ifndef __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
 #define __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
 
+/* Allow the elaborated enum use in _GS_NAMED_ENUM. */
+#pragma GCC system_header
+
 #ifdef __cplusplus
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1