From: Devang Patel Date: Mon, 1 Jul 2002 00:43:41 +0000 (-0700) Subject: objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only. X-Git-Tag: releases/gcc-3.3.0~4033 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=118f8dc12c67534f18a8fe5c95b3319cf962bf14;p=thirdparty%2Fgcc.git objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only. 2002-06-30 Devang Patel * objc/objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only. 2002-06-30 Devang Patel * objc.dg/fsyntax-only.m: New test. From-SVN: r55125 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce3428bf7dc0..87200bca3c00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-06-30 Devang Patel + + * objc/objc-act.c (finish_file): Avoid finish_objc() if + -fsyntax-only. + Fri Jun 28 17:22:37 2002 Denis Chertykov Frank Ch. Eigler Matthew Green diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index c6b9d5ff4ef6..73e30d71881c 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -522,7 +522,10 @@ finish_file () { c_objc_common_finish_file (); - finish_objc (); /* Objective-C finalization */ + /* Finalize Objective-C runtime data. No need to generate tables + and code if only checking syntax. */ + if (!flag_syntax_only) + finish_objc (); if (gen_declaration_file) fclose (gen_declaration_file); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ed5157412987..0dcf1ca48533 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-06-30 Devang Patel + + * objc.dg/fsyntax-only.m: New test. + 2002-06-27 Mark Mitchell PR c++/6695 diff --git a/gcc/testsuite/objc.dg/fsyntax-only.m b/gcc/testsuite/objc.dg/fsyntax-only.m new file mode 100644 index 000000000000..54a879e22c5b --- /dev/null +++ b/gcc/testsuite/objc.dg/fsyntax-only.m @@ -0,0 +1,11 @@ +/* Test -fsyntax-only compiler option */ +/* { dg-do compile } */ +/* { dg-options "-fsyntax-only" } */ + +@interface foo +-(void) my_method:(int) i with:(int) j; +@end + +@implementation foo +-(void) my_method:(int) i with:(int) j { } +@end