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

From-SVN: r109388
This commit is contained in:
Richard Henderson 2006-01-05 13:06:47 -08:00 committed by Richard Henderson
parent 068e6bb3f1
commit b9b58168de
3 changed files with 12 additions and 21 deletions

View 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.

View 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:

View 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