Commit b9b58168 by Richard Henderson Committed by Richard Henderson

* c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA.

From-SVN: r109388
parent 068e6bb3
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> 2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
* c-typeck.c: Update copyright date. * c-typeck.c: Update copyright date.
......
...@@ -5866,6 +5866,9 @@ c_parser_objc_methodprotolist (c_parser *parser) ...@@ -5866,6 +5866,9 @@ c_parser_objc_methodprotolist (c_parser *parser)
case CPP_MINUS: case CPP_MINUS:
c_parser_objc_methodproto (parser); c_parser_objc_methodproto (parser);
break; break;
case CPP_PRAGMA:
c_parser_pragma (parser, pragma_external);
break;
case CPP_EOF: case CPP_EOF:
return; return;
default: default:
......
/* It is OK to use #pragma inside @implementation body. This test checks that. */ /* { dg-do compile { target *-*-darwin* } } */
/* Ziemowit Laski <zlaski@apple.com>. */ /* ??? 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 @interface a {}
{ #pragma mark --- Output ---
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;
}
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment