* c-parse.in (bison parser, init_reswords): Remove uses of
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 May 2001 17:58:41 +0000 (17:58 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 May 2001 17:58:41 +0000 (17:58 +0000)
doing_objc_thang.
* c-tree.h (doing_objc_thang): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42000 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-parse.in
gcc/c-tree.h

index 1839c19..8ea9949 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
+
+       * c-parse.in (bison parser, init_reswords): Remove uses of
+       doing_objc_thang.
+       * c-tree.h (doing_objc_thang): Remove.
+
 2001-05-12  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cpplex.c (_cpp_lex_token): Ensure we warn at most once
index 253cb29..ab2073e 100644 (file)
@@ -701,32 +701,22 @@ primary:
        | primary '.' identifier
                {
 ifobjc
-                  if (doing_objc_thang)
-                    {
-                     if (is_public ($1, $3))
-                       $$ = build_component_ref ($1, $3);
-                     else
-                       $$ = error_mark_node;
-                   }
-                  else
+                   if (!is_public ($1, $3))
+                     $$ = error_mark_node;
+                   else
 end ifobjc
-                   $$ = build_component_ref ($1, $3);
+                     $$ = build_component_ref ($1, $3);
                }
        | primary POINTSAT identifier
                {
                   tree expr = build_indirect_ref ($1, "->");
 
 ifobjc
-                  if (doing_objc_thang)
-                    {
-                     if (is_public (expr, $3))
-                       $$ = build_component_ref (expr, $3);
-                     else
+                     if (!is_public (expr, $3))
                        $$ = error_mark_node;
-                   }
-                  else
+                     else
 end ifobjc
-                    $$ = build_component_ref (expr, $3);
+                       $$ = build_component_ref (expr, $3);
                }
        | primary PLUSPLUS
                { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); }
@@ -3592,10 +3582,12 @@ init_reswords ()
 {
   unsigned int i;
   tree id;
-  int mask = ((doing_objc_thang ? 0 : D_OBJC)
-             | (flag_isoc99 ? 0 : D_C89)
+  int mask = (flag_isoc99 ? 0 : D_C89)
              | (flag_traditional ? D_TRAD : 0)
-             | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0));
+             | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0);
+
+  if (c_language != clk_objective_c)
+     mask |= D_OBJC;
 
   /* It is not necessary to register ridpointers as a GC root, because
      all the trees it points to are permanently interned in the
@@ -3715,7 +3707,8 @@ yylexname ()
       if (TREE_CODE (decl) == TYPE_DECL)
        return TYPENAME;
     }
-  else if (doing_objc_thang)
+ifobjc
+  else
     {
       tree objc_interface_decl = is_class_name (yylval.ttype);
 
@@ -3725,6 +3718,7 @@ yylexname ()
          return CLASSNAME;
        }
     }
+end ifobjc
 
   return IDENTIFIER;
 }
index 543a310..c34bd9c 100644 (file)
@@ -359,11 +359,6 @@ extern int system_header_p;
 /* Warn about implicit declarations.  1 = warning, 2 = error.  */
 extern int mesg_implicit_function_declaration;
 
-/* Nonzero enables objc features.  */
-
-#define doing_objc_thang \
-  (c_language == clk_objective_c)
-
 /* In c-decl.c */
 extern void finish_incomplete_decl PARAMS ((tree));