]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA.
authorRichard Henderson <rth@redhat.com>
Thu, 5 Jan 2006 21:06:47 +0000 (13:06 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 5 Jan 2006 21:06:47 +0000 (13:06 -0800)
From-SVN: r109388

gcc/ChangeLog
gcc/c-parser.c
gcc/testsuite/objc.dg/pragma-1.m

index 632e4b38e39ccdfb3413199e194a8bd640fc5472..99809f0d4fa2670a3631c11c77d98ae3b0d76cce 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-05  Richard Henderson  <rth@redhat.com>
+
+       * c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA.
+
 2006-01-05  Carlos O'Donell  <carlos@codesourcery.com>
 
        * c-typeck.c: Update copyright date.
index eff5b8323479ded1969b7b0d511339aa34dc9758..91a9d299ca0e77c15c80dd9b97c1c8d2e9ef2e84 100644 (file)
@@ -5866,6 +5866,9 @@ c_parser_objc_methodprotolist (c_parser *parser)
        case CPP_MINUS:
          c_parser_objc_methodproto (parser);
          break;
+       case CPP_PRAGMA:
+         c_parser_pragma (parser, pragma_external);
+         break;
        case CPP_EOF:
          return;
        default:
index 14c4d7928a24f25cc844cfc65f2b9e5380131ef9..0c3010dcf30689a9b2c5a0f7685d2512e9362803 100644 (file)
@@ -1,23 +1,7 @@
-/* It is OK to use #pragma inside @implementation body. This test checks that.  */
-/* Ziemowit Laski  <zlaski@apple.com>.  */
+/* { dg-do compile { target *-*-darwin* } } */
+/* ??? Is there a better pragma that is handled for all targets, not
+   handled by the preprocessor, that would be better for testing here?  */
 
-@interface A
-{
-   int p;
-}
-+(int) foo;
--(int) bar;
-@end
-
-@implementation A
-#pragma mark -
-#pragma mark init / dealloc
-+ (int)foo {
-  return 1;
-}
-#pragma mark -
-#pragma mark Private Functions
-- (int)bar {
-  return 2;
-}
+@interface a {}
+#pragma mark --- Output ---
 @end