]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
objc-act.c (finish_file): Avoid finish_objc() if -fsyntax-only.
authorDevang Patel <dpatel@apple.com>
Mon, 1 Jul 2002 00:43:41 +0000 (17:43 -0700)
committerStan Shebs <shebs@gcc.gnu.org>
Mon, 1 Jul 2002 00:43:41 +0000 (00:43 +0000)
2002-06-30  Devang Patel  <dpatel@apple.com>

        * objc/objc-act.c (finish_file): Avoid finish_objc() if
        -fsyntax-only.

2002-06-30  Devang Patel  <dpatel@apple.com>

        * objc.dg/fsyntax-only.m: New test.

From-SVN: r55125

gcc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/fsyntax-only.m [new file with mode: 0644]

index ce3428bf7dc081ead97a9e72c472094f1624d9e9..87200bca3c0067998a78b07e05af67b741e98bd3 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-30  Devang Patel  <dpatel@apple.com>
+
+       * objc/objc-act.c (finish_file): Avoid finish_objc() if
+       -fsyntax-only.
+
 Fri Jun 28 17:22:37 2002  Denis Chertykov  <denisc@overta.ru>
                          Frank Ch. Eigler  <fche@redhat.com>
                          Matthew Green  <mrg@redhat.com>
index c6b9d5ff4ef670585cca8cd37f7afa93d23ebbca..73e30d71881c199beb74c52cbe12ce22b26dd638 100644 (file)
@@ -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);
index ed51574129872db95d92dd6ae2975ae529adfe27..0dcf1ca48533140b29c9d1098b989f61ca05bf00 100644 (file)
@@ -1,3 +1,7 @@
+2002-06-30  Devang Patel  <dpatel@apple.com>
+
+       * objc.dg/fsyntax-only.m: New test.
+
 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
 
        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 (file)
index 0000000..54a879e
--- /dev/null
@@ -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