aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2007-10-08 18:33:08 +0000
committerGeoffrey Keating <geoffk@apple.com>2007-10-08 18:33:08 +0000
commit48320f7495102158dc504fe9a71231f42444208f (patch)
treea9141c9d5af2f86f341c99c6c8d7d5cd13770efa /gcc
parent1e8bc3da4c2872cdf4db002694bbf39d4af7ce3d (diff)
* config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Register
'#pragma mark' to be executed at preprocessing time. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@129134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/darwin.h3
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/pragma-darwin-2.c24
4 files changed, 35 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0c26285137..9ccde307177 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-08 Geoffrey Keating <geoffk@apple.com>
+
+ * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Register
+ '#pragma mark' to be executed at preprocessing time.
+
2007-10-08 Ollie Wild <aaw@google.com>
* varasm.c (compare_constant): Removed call to
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index e135191c3fc..d4c7ce515e4 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -892,7 +892,8 @@ enum machopic_addr_class {
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
- c_register_pragma (0, "mark", darwin_pragma_ignore); \
+ cpp_register_pragma (parse_in, NULL, "mark", \
+ darwin_pragma_ignore, false); \
c_register_pragma (0, "options", darwin_pragma_options); \
c_register_pragma (0, "segment", darwin_pragma_ignore); \
c_register_pragma (0, "unused", darwin_pragma_unused); \
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f7fd6dd35b0..d4d0ad9c36a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-08 Geoffrey Keating <geoffk@apple.com>
+
+ * gcc.dg/pragma-darwin-2.c: New.
+
2007-10-08 Richard Guenther <rguenther@suse.de>
PR middle-end/33693
diff --git a/gcc/testsuite/gcc.dg/pragma-darwin-2.c b/gcc/testsuite/gcc.dg/pragma-darwin-2.c
new file mode 100644
index 00000000000..4bbecef0120
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pragma-darwin-2.c
@@ -0,0 +1,24 @@
+/* Darwin (Mac OS X) pragma exercises. */
+
+/* { dg-do compile { target *-*-darwin* } } */
+
+/* The mark pragma is valid at any point in the program. Fortunately
+ the compiler only needs to ignore it. It's also followed only
+ by pp-tokens, not necessarily real C tokens. */
+
+void foo(void)
+{
+ if (1) {
+ ;
+ }
+ else if (1) {
+ ;
+ }
+#pragma mark "last case" "hi"
+ else if (1) {
+ ;
+ }
+}
+
+#pragma mark 802.11x 1_2_3
+#pragma mark •••• marker ••••