summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/headers.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/headers.m')
-rw-r--r--gcc/testsuite/objc.dg/headers.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/headers.m b/gcc/testsuite/objc.dg/headers.m
new file mode 100644
index 000000000..4c61e1e55
--- /dev/null
+++ b/gcc/testsuite/objc.dg/headers.m
@@ -0,0 +1,31 @@
+// Test for obscure conflicts with the system headers (inspired by similar
+// test in libstdc++-v3). Author: Loren J. Rittle <ljrittle@acm.org>.
+// { dg-options "-Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wshadow" }
+// { dg-do compile }
+
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSString.h>
+#else
+#include <objc/NXConstStr.h>
+#endif
+#include <objc/Object.h>
+#include <objc/Protocol.h>
+#ifdef __NEXT_RUNTIME__
+#include <objc/objc-runtime.h>
+#else
+#include <objc/encoding.h>
+#include <objc/hash.h>
+#endif
+
+#include <objc/objc-api.h>
+#ifndef __NEXT_RUNTIME__
+#include <objc/objc-list.h>
+#endif
+
+#include <objc/objc.h>
+
+#ifndef __NEXT_RUNTIME__
+#include <objc/sarray.h>
+#include <objc/thr.h>
+#include <objc/typedstream.h>
+#endif