This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc/cp/parse.y & gcc/cp/decl.h: Conflict on TYPENAME


The parser declares token TYPENAME and decl.h declares an enum
including TYPENAME.  Several files include both, what results in a
dangerous clash.

Given the risks, I suggest that the parser slowly moves to using the
`tFOO' convention, so, amongst the various possible changes, I
preferred this one: instead of token TYPENAME, using token tTYPENAME.
If you have another preference, please tell me, I'll adjust the patch
accordingly.

I do have tried to check-g++, but I have this bizarre result:

| src/gcc/gcc % make check-g++                                     nostromo Err 2
| (rootme=`${PWDCMD-pwd}`; export rootme; \
| srcdir=`cd .; ${PWDCMD-pwd}` ; export srcdir ; \
| cd testsuite; \
| EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
| if [ -f ${rootme}/../expect/expect ] ; then  \
|    TCL_LIBRARY=`cd .. ; cd ./../tcl/library ; ${PWDCMD-pwd}` ; \
|     export TCL_LIBRARY ; fi ; \
| `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ )
| Test Run By akim on Mon Jun 10 16:33:41 2002
| Native configuration is i686-pc-linux-gnu
| 
|                 === g++ tests ===
| 
| Schedule of variations:
|     unix
| 
| Running target unix
| Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
| Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
| Using /home/akim/src/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
| Running /home/akim/src/gcc/gcc/testsuite/g++.dg/bprob/bprob.exp ...
| /home/akim/src/gcc/libstdc++-v3/testsuite_flags: /home/akim/src/gcc/libstdc++-v3/testsuite_flags: No such file or directory
|     while executing
| "exec sh ${odir_v3}/testsuite_flags --build-includes"
|     (procedure "g++_include_flags" line 21)
|     invoked from within
| [...........]
| make: [check-g++] Error 1 (ignored)


I don't know what I did wrong.  Someone should definitely either give
me an hint on how to run the test suite, or to run the test suite.

Note: I have my editor systematically remove the trailing spaces, and
there appears to be many in these files.  So the patch comes in two
``flavors'': the firs one is `diff -w' so that you can see the real
content of the patch, but the real patch, which includes the trailing
blank (automated) removal, is below.

Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>

	* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
	decl.h's TYPENAME.
	* spew.c, lex.c: Adjust.

Index: lex.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.282
diff -u -u -w -r1.282 lex.c
--- lex.c 4 Jun 2002 07:10:10 -0000 1.282
+++ lex.c 10 Jun 2002 14:36:08 -0000
@@ -86,10 +86,11 @@
 int warn_traditional = 0;
 int flag_digraphs = 1;
 
-/* the declaration found for the last IDENTIFIER token read in.
-   yylex must look this up to detect typedefs, which get token type TYPENAME,
-   so it is left around in case the identifier is not a typedef but is
-   used in a context which makes it a reference to a variable.  */
+/* the declaration found for the last IDENTIFIER token read in.  yylex
+   must look this up to detect typedefs, which get token type
+   tTYPENAME, so it is left around in case the identifier is not a
+   typedef but is used in a context which makes it a reference to a
+   variable.  */
 tree lastiddecl;
 
 /* Array for holding counts of the numbers of tokens seen.  */
@@ -692,7 +693,7 @@
   switch (yychar)
     {
     case IDENTIFIER:
-    case TYPENAME:
+    case tTYPENAME:
     case TYPESPEC:
     case PTYPENAME:
     case PFUNCNAME:
@@ -914,7 +915,7 @@
   if ((yychar > 255
        && yychar != SCSPEC
        && yychar != IDENTIFIER
-       && yychar != TYPENAME
+       && yychar != tTYPENAME
        && yychar != CV_QUALIFIER
        && yychar != SELFNAME)
       || yychar == 0  /* EOF */)
Index: parse.y
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/parse.y,v
retrieving revision 1.262
diff -u -u -w -r1.262 parse.y
--- parse.y 4 Jun 2002 07:10:14 -0000 1.262
+++ parse.y 10 Jun 2002 14:36:08 -0000
@@ -283,7 +283,7 @@
 /* All identifiers that are declared typedefs in the current block.
    In some contexts, they are treated just like IDENTIFIER,
    but they can also serve as typespecs in declarations.  */
-%token TYPENAME
+%token tTYPENAME
 %token SELFNAME
 
 /* A template function.  */
@@ -345,7 +345,7 @@
 %nonassoc IF
 %nonassoc ELSE
 
-%left IDENTIFIER PFUNCNAME TYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD ATTRIBUTE
+%left IDENTIFIER PFUNCNAME tTYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD ATTRIBUTE
 
 %left '{' ',' ';'
 
@@ -375,7 +375,7 @@
 
 %type <code> unop
 
-%type <ttype> identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist
+%type <ttype> identifier IDENTIFIER tTYPENAME CONSTANT expr nonnull_exprlist
 %type <ttype> PFUNCNAME maybe_identifier
 %type <ttype> paren_expr_or_null nontrivial_exprlist SELFNAME
 %type <ttype> expr_no_commas expr_no_comma_rangle
@@ -1023,7 +1023,7 @@
 
 identifier:
 	  IDENTIFIER
-	| TYPENAME
+	| tTYPENAME
 	| SELFNAME
 	| PTYPENAME
 	| NSNAME
@@ -1089,7 +1089,7 @@
 	  PTYPENAME '<' template_arg_list_opt template_close_bracket
 	    finish_template_type_
                 { $$ = $5; }
-	| TYPENAME  '<' template_arg_list_opt template_close_bracket
+	| tTYPENAME  '<' template_arg_list_opt template_close_bracket
 	    finish_template_type_
                 { $$ = $5; }
 	| self_template_type
@@ -1557,7 +1557,7 @@
 
 unqualified_id:
 	  notype_unqualified_id
-	| TYPENAME
+	| tTYPENAME
 	| SELFNAME
 	;
 
@@ -2770,7 +2770,7 @@
 	  after_type_declarator maybeasm maybe_attribute maybe_init
 		{ $$ = parse_field0 ($1, $<ftype>0.t, $<ftype>0.lookups,
 				     $3, $2, $4); }
-	| TYPENAME ':' expr_no_commas maybe_attribute
+	| tTYPENAME ':' expr_no_commas maybe_attribute
 		{ $$ = parse_bitfield0 ($1, $<ftype>0.t, $<ftype>0.lookups,
 					$4, $3); }
 	;
@@ -2793,7 +2793,7 @@
 after_type_component_declarator:
 	  after_type_declarator maybeasm maybe_attribute maybe_init
 		{ $$ = parse_field ($1, $3, $2, $4); }
-	| TYPENAME ':' expr_no_commas maybe_attribute
+	| tTYPENAME ':' expr_no_commas maybe_attribute
 		{ $$ = parse_bitfield ($1, $4, $3); }
 	;
 
@@ -3065,7 +3065,7 @@
 	;
 
 type_name:
-	  TYPENAME
+	  tTYPENAME
 	| SELFNAME
 	| template_type  %prec EMPTY
 	;
@@ -3089,7 +3089,7 @@
 /* Why the @#$%^& do type_name and notype_identifier need to be expanded
    inline here?!?  (jason) */
 nested_name_specifier_1:
-	  TYPENAME SCOPE
+	  tTYPENAME SCOPE
 		{
 		  if (TREE_CODE ($1) == IDENTIFIER_NODE)
 		    {
@@ -3175,7 +3175,7 @@
 /* This needs to return a TYPE_DECL for simple names so that we don't
    forget what name was used.  */
 typename_sub2:
-	  TYPENAME SCOPE
+	  tTYPENAME SCOPE
 		{
 		  if (TREE_CODE ($1) != TYPE_DECL)
 		    $$ = lastiddecl;
@@ -3613,7 +3613,7 @@
                 { finish_label_stmt ($1); }
 	| PTYPENAME ':'
                 { finish_label_stmt ($1); }
-	| TYPENAME ':'
+	| tTYPENAME ':'
                 { finish_label_stmt ($1); }
 	| SELFNAME ':'
                 { finish_label_stmt ($1); }
Index: spew.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/spew.c,v
retrieving revision 1.65
diff -u -u -w -r1.65 spew.c
--- spew.c 4 Jun 2002 07:10:23 -0000 1.65
+++ spew.c 10 Jun 2002 14:36:08 -0000
@@ -161,10 +161,11 @@
 static tree last_token_id;
 
 /* From lex.c: */
-/* the declaration found for the last IDENTIFIER token read in.
-   yylex must look this up to detect typedefs, which get token type TYPENAME,
-   so it is left around in case the identifier is not a typedef but is
-   used in a context which makes it a reference to a variable.  */
+/* the declaration found for the last IDENTIFIER token read in.  yylex
+   must look this up to detect typedefs, which get token type
+   tTYPENAME, so it is left around in case the identifier is not a
+   typedef but is used in a context which makes it a reference to a
+   variable.  */
 extern tree lastiddecl;		/* let our brains leak out here too */
 extern int	yychar;		/*  the lookahead symbol		*/
 extern YYSTYPE	yylval;		/*  the semantic value of the		*/
@@ -636,11 +637,11 @@
   if (t && t == decl)
     return SELFNAME;
 
-  return TYPENAME;
+  return tTYPENAME;
 }
 
 /* token[0] == AGGR (struct/union/enum)
-   Thus, token[1] is either a TYPENAME or a TYPENAME_DEFN.
+   Thus, token[1] is either a tTYPENAME or a TYPENAME_DEFN.
    If token[2] == '{' or ':' then it's TYPENAME_DEFN.
    It's also a definition if it's a forward declaration (as in 'struct Foo;')
    which we can tell if token[2] == ';' *and* token[-1] != FRIEND or NEW.  */
@@ -652,7 +653,7 @@
   
   scan_tokens (2);
   yc1 = nth_token (1)->yychar;
-  if (yc1 != TYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME)
+  if (yc1 != tTYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME)
     return;
   yc2 = nth_token (2)->yychar;
   if (yc2 == ';')
@@ -667,7 +668,7 @@
 
   switch (yc1)
     {
-    case TYPENAME:
+    case tTYPENAME:
       nth_token (1)->yychar = TYPENAME_DEFN;
       break;
     case PTYPENAME:
@@ -765,7 +766,7 @@
       break;
     }
     case IDENTIFIER_DEFN:
-    case TYPENAME:
+    case tTYPENAME:
     case TYPENAME_DEFN:
     case PTYPENAME:
     case PTYPENAME_DEFN:
@@ -898,7 +899,7 @@
       yyc = identifier_type (trrr);
       switch(yyc)
         {
-          case TYPENAME:
+          case tTYPENAME:
           case SELFNAME:
           case NSNAME:
           case PTYPENAME:
@@ -1469,7 +1470,7 @@
 {
   if (yy<256)
     fprintf (stderr, "->%d < %c >\n", lineno, yy);
-  else if (yy == IDENTIFIER || yy == TYPENAME)
+  else if (yy == IDENTIFIER || yy == tTYPENAME)
     {
       const char *id;
       if (TREE_CODE (yylval.ttype) == IDENTIFIER_NODE)
Now the real patch, including trailing spaces nuking.

Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>

	* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
	decl.h's TYPENAME.
	Whitespace changes.
	* spew.c, lex.c: Adjust.
	Whitespace changes.

Index: lex.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.282
diff -u -u -r1.282 lex.c
--- lex.c 4 Jun 2002 07:10:10 -0000 1.282
+++ lex.c 10 Jun 2002 14:34:08 -0000
@@ -86,10 +86,11 @@
 int warn_traditional = 0;
 int flag_digraphs = 1;

-/* the declaration found for the last IDENTIFIER token read in.
-   yylex must look this up to detect typedefs, which get token type TYPENAME,
-   so it is left around in case the identifier is not a typedef but is
-   used in a context which makes it a reference to a variable.  */
+/* the declaration found for the last IDENTIFIER token read in.  yylex
+   must look this up to detect typedefs, which get token type
+   tTYPENAME, so it is left around in case the identifier is not a
+   typedef but is used in a context which makes it a reference to a
+   variable.  */
 tree lastiddecl;

 /* Array for holding counts of the numbers of tokens seen.  */
@@ -692,7 +693,7 @@
   switch (yychar)
     {
     case IDENTIFIER:
-    case TYPENAME:
+    case tTYPENAME:
     case TYPESPEC:
     case PTYPENAME:
     case PFUNCNAME:
@@ -914,7 +915,7 @@
   if ((yychar > 255
        && yychar != SCSPEC
        && yychar != IDENTIFIER
-       && yychar != TYPENAME
+       && yychar != tTYPENAME
        && yychar != CV_QUALIFIER
        && yychar != SELFNAME)
       || yychar == 0  /* EOF */)
Index: parse.y
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/parse.y,v
retrieving revision 1.262
diff -u -u -r1.262 parse.y
--- parse.y 4 Jun 2002 07:10:14 -0000 1.262
+++ parse.y 10 Jun 2002 14:34:08 -0000
@@ -138,7 +138,7 @@
   tree parms;

 #ifndef NO_IMPLICIT_EXTERN_C
-  if (in_system_header && current_class_type == NULL
+  if (in_system_header && current_class_type == NULL
       && current_lang_name == lang_name_c)
     parms = NULL_TREE;
   else
@@ -163,12 +163,12 @@
     {
       /* We have to indicate that there is an "extern", but that it
          was part of a language specifier.  For instance,
-
+
     	    extern "C" typedef int (*Ptr) ();

          is well formed.  */
       current_declspecs = tree_cons (error_mark_node,
-				     get_identifier ("extern"),
+				     get_identifier ("extern"),
 				     current_declspecs);
       used_extern_spec = 1;
     }
@@ -268,10 +268,10 @@
 %start program

 %union { GTY(())
-  long itype;
-  tree ttype;
-  char *strtype;
-  enum tree_code code;
+  long itype;
+  tree ttype;
+  char *strtype;
+  enum tree_code code;
   flagged_type_tree ftype;
   struct unparsed_text *pi;
 }
@@ -283,7 +283,7 @@
 /* All identifiers that are declared typedefs in the current block.
    In some contexts, they are treated just like IDENTIFIER,
    but they can also serve as typespecs in declarations.  */
-%token TYPENAME
+%token tTYPENAME
 %token SELFNAME

 /* A template function.  */
@@ -345,7 +345,7 @@
 %nonassoc IF
 %nonassoc ELSE

-%left IDENTIFIER PFUNCNAME TYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD ATTRIBUTE
+%left IDENTIFIER PFUNCNAME tTYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD ATTRIBUTE

 %left '{' ',' ';'

@@ -375,7 +375,7 @@

 %type <code> unop

-%type <ttype> identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist
+%type <ttype> identifier IDENTIFIER tTYPENAME CONSTANT expr nonnull_exprlist
 %type <ttype> PFUNCNAME maybe_identifier
 %type <ttype> paren_expr_or_null nontrivial_exprlist SELFNAME
 %type <ttype> expr_no_commas expr_no_comma_rangle
@@ -396,14 +396,14 @@
 %type <ttype> after_type_declarator_intern
 %type <ttype> direct_notype_declarator direct_after_type_declarator
 %type <itype> components notype_components
-%type <ttype> component_decl component_decl_1
+%type <ttype> component_decl component_decl_1
 %type <ttype> component_declarator component_declarator0
 %type <ttype> notype_component_declarator notype_component_declarator0
 %type <ttype> after_type_component_declarator after_type_component_declarator0
 %type <ttype> absdcl cv_qualifiers
 %type <ttype> direct_abstract_declarator conversion_declarator
 %type <ttype> new_declarator direct_new_declarator
-%type <ttype> xexpr parmlist parms bad_parm
+%type <ttype> xexpr parmlist parms bad_parm
 %type <ttype> identifiers_or_typenames
 %type <ttype> fcast_or_absdcl regcast_or_absdcl
 %type <ttype> expr_or_declarator expr_or_declarator_intern
@@ -412,7 +412,7 @@
 %type <ttype> template_id do_id object_template_id notype_template_declarator
 %type <ttype> overqualified_id notype_qualified_id any_id
 %type <ttype> complex_direct_notype_declarator functional_cast
-%type <ttype> complex_parmlist parms_comma
+%type <ttype> complex_parmlist parms_comma
 %type <ttype> namespace_qualifier namespace_using_decl

 %type <ftype> type_id new_type_id typed_typespecs typespec typed_declspecs
@@ -426,7 +426,7 @@
 %token <ttype> PTYPENAME
 %token <ttype> EXTERN_LANG_STRING ALL
 %token <ttype> PRE_PARSED_CLASS_DECL DEFARG DEFARG_MARKER
-%token <pi> PRE_PARSED_FUNCTION_DECL
+%token <pi> PRE_PARSED_FUNCTION_DECL
 %type <ttype> component_constructor_declarator
 %type <ttype> fn_def2 return_id constructor_declarator
 %type <ttype> begin_function_body_
@@ -569,7 +569,7 @@
 	;

 namespace_alias:
-          NAMESPACE identifier '='
+          NAMESPACE identifier '='
                 { begin_only_namespace_names (); }
           any_id ';'
 		{
@@ -656,7 +656,7 @@

 template_spec_header:
 	  TEMPLATE '<' '>'
-                { begin_specialization();
+                { begin_specialization();
 		  $$ = NULL_TREE; }
 	;

@@ -809,7 +809,7 @@
 function_body:
 	  begin_function_body_ ctor_initializer_opt save_lineno '{'
 		{ $<ttype>$ = begin_compound_stmt (/*has_no_scope=*/1); }
-	  compstmtend
+	  compstmtend
                 {
 		  STMT_LINENO ($<ttype>5) = $3;
 		  finish_compound_stmt (/*has_no_scope=*/1, $<ttype>5);
@@ -827,15 +827,15 @@
 	;

 constructor_declarator:
-	  nested_name_specifier SELFNAME '('
+	  nested_name_specifier SELFNAME '('
                 { $$ = begin_constructor_declarator ($1, $2); }
 	  parmlist ')' cv_qualifiers exception_specification_opt
 		{ $$ = make_call_declarator ($<ttype>4, $5, $7, $8); }
 	| nested_name_specifier SELFNAME LEFT_RIGHT cv_qualifiers exception_specification_opt
-                { $$ = begin_constructor_declarator ($1, $2);
+                { $$ = begin_constructor_declarator ($1, $2);
 		  $$ = make_call_declarator ($$, empty_parms (), $4, $5);
 		}
-	| global_scope nested_name_specifier SELFNAME '('
+	| global_scope nested_name_specifier SELFNAME '('
                 { $$ = begin_constructor_declarator ($2, $3); }
 	 parmlist ')' cv_qualifiers exception_specification_opt
 		{ $$ = make_call_declarator ($<ttype>5, $6, $8, $9); }
@@ -843,7 +843,7 @@
 		{ $$ = begin_constructor_declarator ($2, $3);
 		  $$ = make_call_declarator ($$, empty_parms (), $5, $6);
 		}
-	| nested_name_specifier self_template_type '('
+	| nested_name_specifier self_template_type '('
                 { $$ = begin_constructor_declarator ($1, $2); }
 	  parmlist ')' cv_qualifiers exception_specification_opt
 		{ $$ = make_call_declarator ($<ttype>4, $5, $7, $8); }
@@ -851,12 +851,12 @@
 		{ $$ = begin_constructor_declarator ($1, $2);
 		  $$ = make_call_declarator ($$, empty_parms (), $4, $5);
 		}
-	| global_scope nested_name_specifier self_template_type '('
+	| global_scope nested_name_specifier self_template_type '('
                 { $$ = begin_constructor_declarator ($2, $3); }
 	 parmlist ')' cv_qualifiers exception_specification_opt
 		{ $$ = make_call_declarator ($<ttype>5, $6, $8, $9); }
 	| global_scope nested_name_specifier self_template_type LEFT_RIGHT cv_qualifiers exception_specification_opt
-		{ $$ = begin_constructor_declarator ($2, $3);
+		{ $$ = begin_constructor_declarator ($2, $3);
 		  $$ = make_call_declarator ($$, empty_parms (), $5, $6);
 		}
 	;
@@ -911,19 +911,19 @@
 		    yychar = YYLEX;
 		  snarf_method ($$); }
 	| component_constructor_declarator
-		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
+		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
 		  goto rest_of_mdef; }
 	| typed_declspecs declarator
 		{ $$ = parse_method ($2, $1.t, $1.lookups); goto rest_of_mdef;}
 	| declmods notype_declarator
 		{ $$ = parse_method ($2, $1.t, $1.lookups); goto rest_of_mdef;}
 	| notype_declarator
-		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
+		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
 		  goto rest_of_mdef; }
 	| declmods constructor_declarator
 		{ $$ = parse_method ($2, $1.t, $1.lookups); goto rest_of_mdef;}
 	| constructor_declarator
-		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
+		{ $$ = parse_method ($1, NULL_TREE, NULL_TREE);
 		  goto rest_of_mdef; }
 	;

@@ -964,20 +964,20 @@

 member_init_list:
 	  /* empty */
-		{
-		  $$.new_type_flag = 0;
-		  $$.t = NULL_TREE;
+		{
+		  $$.new_type_flag = 0;
+		  $$.t = NULL_TREE;
 		}
 	| member_init
-		{
-		  $$.new_type_flag = 1;
-		  $$.t = $1;
+		{
+		  $$.new_type_flag = 1;
+		  $$.t = $1;
 		}
 	| member_init_list ',' member_init
-                {
-		  if ($3)
+                {
+		  if ($3)
 		    {
-		      $$.new_type_flag = 1;
+		      $$.new_type_flag = 1;
 		      TREE_CHAIN ($3) = $1.t;
 		      $$.t = $3;
 		    }
@@ -999,7 +999,7 @@
 		  if (current_class_name)
 		    pedwarn ("anachronistic old style base class initializer");
 		  $$ = expand_member_init (current_class_ref,
-					   NULL_TREE,
+					   NULL_TREE,
 					   void_type_node);
 		}
 	| notype_identifier '(' nonnull_exprlist ')'
@@ -1023,7 +1023,7 @@

 identifier:
 	  IDENTIFIER
-	| TYPENAME
+	| tTYPENAME
 	| SELFNAME
 	| PTYPENAME
 	| NSNAME
@@ -1031,7 +1031,7 @@

 notype_identifier:
 	  IDENTIFIER
-	| PTYPENAME
+	| PTYPENAME
 	| NSNAME  %prec EMPTY
 	;

@@ -1060,7 +1060,7 @@
 		{ do_type_instantiation ($4.t, $1, 1);
 		  yyungetc (';', 1); }
           end_explicit_instantiation
-	| SCSPEC TEMPLATE begin_explicit_instantiation typed_declspecs
+	| SCSPEC TEMPLATE begin_explicit_instantiation typed_declspecs
           declarator
 		{ tree specs = strip_attrs ($4.t);
 		  do_decl_instantiation (specs, $5, $1); }
@@ -1073,11 +1073,11 @@
           end_explicit_instantiation
 	;

-begin_explicit_instantiation:
+begin_explicit_instantiation:
       { begin_explicit_instantiation(); }
         ;

-end_explicit_instantiation:
+end_explicit_instantiation:
       { end_explicit_instantiation(); }
         ;

@@ -1089,7 +1089,7 @@
 	  PTYPENAME '<' template_arg_list_opt template_close_bracket
 	    finish_template_type_
                 { $$ = $5; }
-	| TYPENAME  '<' template_arg_list_opt template_close_bracket
+	| tTYPENAME  '<' template_arg_list_opt template_close_bracket
 	    finish_template_type_
                 { $$ = $5; }
 	| self_template_type
@@ -1109,18 +1109,18 @@
 	;

 finish_template_type_:
-                {
+                {
 		  if (yychar == YYEMPTY)
 		    yychar = YYLEX;

-		  $$ = finish_template_type ($<ttype>-3, $<ttype>-1,
+		  $$ = finish_template_type ($<ttype>-3, $<ttype>-1,
 					     yychar == SCOPE);
 		}
         ;

 template_close_bracket:
 	  '>'
-	| RSHIFT
+	| RSHIFT
 		{
 		  /* Handle `Class<Class<Type>>' without space in the `>>' */
 		  pedwarn ("`>>' should be `> >' in template class name");
@@ -1231,11 +1231,11 @@
 		  $<ttype>$ = parse_decl ($<ttype>2, $4, 1);
 		}
 	  init
-		{
+		{
 		  parse_end_decl ($<ttype>6, $7, $4);
-		  $$ = convert_from_reference ($<ttype>6);
+		  $$ = convert_from_reference ($<ttype>6);
 		  if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
-		    error ("definition of array `%#D' in condition", $$);
+		    error ("definition of array `%#D' in condition", $$);
 		}
 	| expr
 	;
@@ -1249,10 +1249,10 @@

 nontrivial_exprlist:
 	  expr_no_commas ',' expr_no_commas
-		{ $$ = tree_cons (NULL_TREE, $$,
+		{ $$ = tree_cons (NULL_TREE, $$,
 		                  build_tree_list (NULL_TREE, $3)); }
 	| expr_no_commas ',' error
-		{ $$ = tree_cons (NULL_TREE, $$,
+		{ $$ = tree_cons (NULL_TREE, $$,
 		                  build_tree_list (NULL_TREE, error_mark_node)); }
 	| nontrivial_exprlist ',' expr_no_commas
 		{ chainon ($$, build_tree_list (NULL_TREE, $3)); }
@@ -1292,36 +1292,36 @@
 	| ALIGNOF unary_expr  %prec UNARY
 		{ $$ = finish_alignof ($2); }
 	| ALIGNOF '(' type_id ')'  %prec HYPERUNARY
-		{ $$ = finish_alignof (groktypename ($3.t));
+		{ $$ = finish_alignof (groktypename ($3.t));
 		  check_for_new_type ("alignof", $3); }

 	/* The %prec EMPTY's here are required by the = init initializer
 	   syntax extension; see below.  */
 	| new new_type_id  %prec EMPTY
-		{ $$ = build_new (NULL_TREE, $2.t, NULL_TREE, $1);
+		{ $$ = build_new (NULL_TREE, $2.t, NULL_TREE, $1);
 		  check_for_new_type ("new", $2); }
 	| new new_type_id new_initializer
-		{ $$ = build_new (NULL_TREE, $2.t, $3, $1);
+		{ $$ = build_new (NULL_TREE, $2.t, $3, $1);
 		  check_for_new_type ("new", $2); }
 	| new new_placement new_type_id  %prec EMPTY
-		{ $$ = build_new ($2, $3.t, NULL_TREE, $1);
+		{ $$ = build_new ($2, $3.t, NULL_TREE, $1);
 		  check_for_new_type ("new", $3); }
 	| new new_placement new_type_id new_initializer
-		{ $$ = build_new ($2, $3.t, $4, $1);
+		{ $$ = build_new ($2, $3.t, $4, $1);
 		  check_for_new_type ("new", $3); }
 	| new '(' type_id ')'
             %prec EMPTY
 		{ $$ = build_new (NULL_TREE, groktypename($3.t),
-				  NULL_TREE, $1);
+				  NULL_TREE, $1);
 		  check_for_new_type ("new", $3); }
 	| new '(' type_id ')' new_initializer
-		{ $$ = build_new (NULL_TREE, groktypename($3.t), $5, $1);
+		{ $$ = build_new (NULL_TREE, groktypename($3.t), $5, $1);
 		  check_for_new_type ("new", $3); }
 	| new new_placement '(' type_id ')' %prec EMPTY
-		{ $$ = build_new ($2, groktypename($4.t), NULL_TREE, $1);
+		{ $$ = build_new ($2, groktypename($4.t), NULL_TREE, $1);
 		  check_for_new_type ("new", $4); }
 	| new new_placement '(' type_id ')' new_initializer
-		{ $$ = build_new ($2, groktypename($4.t), $6, $1);
+		{ $$ = build_new ($2, groktypename($4.t), $6, $1);
 		  check_for_new_type ("new", $4); }

 	| delete cast_expr  %prec UNARY
@@ -1360,7 +1360,7 @@
 		}
 	/* GNU extension so people can use initializer lists.  Note that
 	   this alters the meaning of `new int = 1', which was previously
-	   syntactically valid but semantically invalid.
+	   syntactically valid but semantically invalid.
            This feature is now deprecated and will be removed in a future
            release.  */
 	| '=' init
@@ -1383,7 +1383,7 @@
 		  $$ = make_call_declarator (NULL_TREE, $2.t, NULL_TREE, NULL_TREE);
 		  check_for_new_type ("cast", $2); }
 	| regcast_or_absdcl '(' type_id ')'  %prec EMPTY
-		{ $3.t = finish_parmlist (build_tree_list (NULL_TREE, $3.t), 0);
+		{ $3.t = finish_parmlist (build_tree_list (NULL_TREE, $3.t), 0);
 		  $$ = make_call_declarator ($$, $3.t, NULL_TREE, NULL_TREE);
 		  check_for_new_type ("cast", $3); }
 	;
@@ -1393,9 +1393,9 @@
 	| regcast_or_absdcl unary_expr  %prec UNARY
 		{ $$ = reparse_absdcl_as_casts ($$, $2); }
 	| regcast_or_absdcl '{' initlist maybecomma '}'  %prec UNARY
-		{
+		{
 		  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
-					nreverse ($3));
+					nreverse ($3));
 		  if (pedantic)
 		    pedwarn ("ISO C++ forbids compound literals");
 		  /* Indicate that this was a C99 compound literal.  */
@@ -1539,7 +1539,7 @@
         ;

 template_id:
-          PFUNCNAME '<' do_id template_arg_list_opt template_close_bracket
+          PFUNCNAME '<' do_id template_arg_list_opt template_close_bracket
                 { $$ = lookup_template_function ($3, $4); }
         | operator_name '<' do_id template_arg_list_opt template_close_bracket
                 { $$ = lookup_template_function ($3, $4); }
@@ -1550,14 +1550,14 @@
                 { $$ = lookup_template_function ($2, $4); }
         | TEMPLATE PFUNCNAME '<' template_arg_list_opt template_close_bracket
                 { $$ = lookup_template_function ($2, $4); }
-        | TEMPLATE operator_name '<' template_arg_list_opt
+        | TEMPLATE operator_name '<' template_arg_list_opt
           template_close_bracket
                 { $$ = lookup_template_function ($2, $4); }
         ;

 unqualified_id:
 	  notype_unqualified_id
-	| TYPENAME
+	| tTYPENAME
 	| SELFNAME
 	;

@@ -1587,7 +1587,7 @@
 	| NSNAME '<' template_arg_list template_close_bracket
                 { $$ = lookup_template_function ($1, $3); }
 	;
-
+
 direct_notype_declarator:
 	  complex_direct_notype_declarator
 	/* This precedence declaration is to prefer this reduce
@@ -1603,9 +1603,9 @@
 		{
 		  if (TREE_CODE ($1) == BIT_NOT_EXPR)
 		    $$ = build_x_unary_op (BIT_NOT_EXPR, TREE_OPERAND ($1, 0));
-		  else
+		  else
 		    $$ = finish_id_expr ($1);
-		}
+		}
 	| CONSTANT
 	| boolean_literal
 	| STRING
@@ -1639,8 +1639,8 @@
 		      YYERROR;
 		    }
 		  if (pedantic)
-		    pedwarn ("ISO C++ forbids braced-groups within expressions");
-		  $<ttype>$ = begin_stmt_expr ();
+		    pedwarn ("ISO C++ forbids braced-groups within expressions");
+		  $<ttype>$ = begin_stmt_expr ();
 		}
 	  compstmt_or_stmtexpr ')'
                { $$ = finish_stmt_expr ($<ttype>2); }
@@ -1720,8 +1720,8 @@
 	| overqualified_id LEFT_RIGHT
 		{ $$ = finish_qualified_call_expr ($1, NULL_TREE); }
         | object object_template_id %prec UNARY
-                {
-		  $$ = build_x_component_ref ($$, $2, NULL_TREE, 1);
+                {
+		  $$ = build_x_component_ref ($$, $2, NULL_TREE, 1);
 		}
         | object object_template_id '(' nonnull_exprlist ')'
                 { $$ = finish_object_call_expr ($2, $1, $4); }
@@ -1825,7 +1825,7 @@
 		{ got_object = TREE_TYPE ($$); }
 	| primary POINTSAT
 		{
-		  $$ = build_x_arrow ($$);
+		  $$ = build_x_arrow ($$);
 		  got_object = TREE_TYPE ($$);
 		}
 	;
@@ -1874,20 +1874,20 @@
 /* ISO type-id (8.1) */
 type_id:
 	  typed_typespecs absdcl
-		{ $$.t = build_tree_list ($1.t, $2);
+		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| nonempty_cv_qualifiers absdcl
-		{ $$.t = build_tree_list ($1.t, $2);
+		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typespec absdcl
 		{ $$.t = build_tree_list (build_tree_list (NULL_TREE, $1.t),
-					  $2);
+					  $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typed_typespecs  %prec EMPTY
 		{ $$.t = build_tree_list ($1.t, NULL_TREE);
 		  $$.new_type_flag = $1.new_type_flag;  }
 	| nonempty_cv_qualifiers  %prec EMPTY
-		{ $$.t = build_tree_list ($1.t, NULL_TREE);
+		{ $$.t = build_tree_list ($1.t, NULL_TREE);
 		  $$.new_type_flag = $1.new_type_flag; }
 	;

@@ -1905,23 +1905,23 @@

 typed_declspecs1:
 	  declmods typespec
-		{ $$.t = tree_cons (NULL_TREE, $2.t, $1.t);
+		{ $$.t = tree_cons (NULL_TREE, $2.t, $1.t);
 		  $$.new_type_flag = $2.new_type_flag; }
 	| typespec reserved_declspecs  %prec HYPERUNARY
-		{ $$.t = tree_cons (NULL_TREE, $1.t, $2);
+		{ $$.t = tree_cons (NULL_TREE, $1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typespec reserved_typespecquals reserved_declspecs
-		{ $$.t = tree_cons (NULL_TREE, $1.t, chainon ($2, $3));
+		{ $$.t = tree_cons (NULL_TREE, $1.t, chainon ($2, $3));
 		  $$.new_type_flag = $1.new_type_flag; }
 	| declmods typespec reserved_declspecs
-		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
+		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
 		  $$.new_type_flag = $2.new_type_flag; }
 	| declmods typespec reserved_typespecquals
-		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
+		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
 		  $$.new_type_flag = $2.new_type_flag; }
 	| declmods typespec reserved_typespecquals reserved_declspecs
 		{ $$.t = tree_cons (NULL_TREE, $2.t,
-				    chainon ($3, chainon ($4, $1.t)));
+				    chainon ($3, chainon ($4, $1.t)));
 		  $$.new_type_flag = $2.new_type_flag; }
 	;

@@ -1987,16 +1987,16 @@

 typed_typespecs:
 	  typespec  %prec EMPTY
-		{ $$.t = build_tree_list (NULL_TREE, $1.t);
+		{ $$.t = build_tree_list (NULL_TREE, $1.t);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| nonempty_cv_qualifiers typespec
-		{ $$.t = tree_cons (NULL_TREE, $2.t, $1.t);
+		{ $$.t = tree_cons (NULL_TREE, $2.t, $1.t);
 		  $$.new_type_flag = $2.new_type_flag; }
 	| typespec reserved_typespecquals
-		{ $$.t = tree_cons (NULL_TREE, $1.t, $2);
+		{ $$.t = tree_cons (NULL_TREE, $1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| nonempty_cv_qualifiers typespec reserved_typespecquals
-		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
+		{ $$.t = tree_cons (NULL_TREE, $2.t, chainon ($3, $1.t));
 		  $$.new_type_flag = $2.new_type_flag; }
 	;

@@ -2119,7 +2119,7 @@
 		{ $<ttype>$ = parse_decl0 ($<ttype>-1, $<ftype>-2.t,
 					   $<ftype>-2.lookups, $1, 1); }
           /* Note how the declaration of the variable is in effect
-	     while its init is parsed! */
+	     while its init is parsed! */
 	  init
 		{ parse_end_decl ($<ttype>3, $4, $<ttype>0); }
 	| maybe_attribute
@@ -2127,7 +2127,7 @@
 					$<ftype>-2.lookups, $1, 0);
 		  parse_end_decl (d, NULL_TREE, $<ttype>0); }
   	;
-
+
 initdcl0:
 	  declarator maybeasm initdcl0_innards
                 {}
@@ -2137,15 +2137,15 @@
           notype_declarator maybeasm initdcl0_innards
                 {}
         ;
-
+
 nomods_initdcl0:
           notype_declarator maybeasm
             { /* Set things up as initdcl0_innards expects.  */
 	      $<ttype>$ = $2;
-	      $2 = $1;
+	      $2 = $1;
               $<ftype>1.t = NULL_TREE;
 	      $<ftype>1.lookups = NULL_TREE; }
-          initdcl0_innards
+          initdcl0_innards
             {}
 	| constructor_declarator maybeasm maybe_attribute
 		{ tree d = parse_decl0 ($1, NULL_TREE, NULL_TREE, $3, 0);
@@ -2160,7 +2160,7 @@
 	| attributes
 		{ $$ = $1; }
 	;
-
+
 attributes:
       attribute
 		{ $$ = $1; }
@@ -2179,7 +2179,7 @@
 	| attribute_list ',' attrib
 		{ $$ = chainon ($1, $3); }
 	;
-
+
 attrib:
 	  /* empty */
 		{ $$ = NULL_TREE; }
@@ -2259,13 +2259,13 @@
 		  process_next_inline ($1);
 		}
 	| PRE_PARSED_FUNCTION_DECL maybe_return_init function_try_block
-		{
-		  expand_body (finish_function (2));
+		{
+		  expand_body (finish_function (2));
                   process_next_inline ($1);
 		}
 	| PRE_PARSED_FUNCTION_DECL maybe_return_init error
-		{
-		  finish_function (2);
+		{
+		  finish_function (2);
 		  process_next_inline ($1); }
 	;

@@ -2311,14 +2311,14 @@
 		  current_enum_type = $<ttype>3;
 		  check_for_missing_semicolon ($$.t); }
 	| ENUM identifier
-		{ $$.t = xref_tag (enum_type_node, $2, 1);
+		{ $$.t = xref_tag (enum_type_node, $2, 1);
 		  $$.new_type_flag = 0; }
 	| ENUM complex_type_name
-		{ $$.t = xref_tag (enum_type_node, $2, 1);
+		{ $$.t = xref_tag (enum_type_node, $2, 1);
 		  $$.new_type_flag = 0; }
 	| TYPENAME_KEYWORD typename_sub
 		{ $$.t = $2;
-		  $$.new_type_flag = 0;
+		  $$.new_type_flag = 0;
 		  if (!processing_template_decl)
 		    pedwarn ("using `typename' outside of template"); }
 	/* C++ extensions, merged with C to avoid shift/reduce conflicts */
@@ -2327,7 +2327,7 @@
 		  if ($2 && $1.t != error_mark_node)
 		    {
 		      tree type = TREE_TYPE ($1.t);
-
+
 		      if (TREE_CODE (type) == TYPENAME_TYPE)
 			/* In a definition of a member class template,
                            we will get here with an implicit typename,
@@ -2336,11 +2336,11 @@
 		      maybe_process_partial_specialization (type);
 		      xref_basetypes (current_aggr, $1.t, type, $2);
 		    }
-		  $1.t = begin_class_definition (TREE_TYPE ($1.t));
+		  $1.t = begin_class_definition (TREE_TYPE ($1.t));
 		  check_class_key (current_aggr, $1.t);
                   current_aggr = NULL_TREE; }
           opt.component_decl_list '}' maybe_attribute
-		{
+		{
 		  int semi;
 		  tree t;

@@ -2365,7 +2365,7 @@
 	  pending_inlines
                 {
 		  $$.t = $<ttype>8;
-		  $$.new_type_flag = 1;
+		  $$.new_type_flag = 1;
 		}
 	| class_head_decl
 		{
@@ -2426,18 +2426,18 @@

 class_head_apparent_template:
 	  aggr apparent_template_type
-		{
-		  current_aggr = $1;
+		{
+		  current_aggr = $1;
 		  $$ = $2;
 		}
 	| aggr nested_name_specifier apparent_template_type
-		{
-		  current_aggr = $1;
+		{
+		  current_aggr = $1;
 		  $$ = $3;
 		}
 	| aggr global_scope nested_name_specifier apparent_template_type
-		{
-		  current_aggr = $1;
+		{
+		  current_aggr = $1;
 		  $$ = $4;
 		}
 	;
@@ -2589,7 +2589,7 @@
 opt.component_decl_list:
 	| component_decl_list
 	| opt.component_decl_list access_specifier component_decl_list
-	| opt.component_decl_list access_specifier
+	| opt.component_decl_list access_specifier
 	;

 access_specifier:
@@ -2603,13 +2603,13 @@
    ARM $9.2 says that the semicolon is optional, and therefore allowed.  */
 component_decl_list:
 	  component_decl
-		{
+		{
 		  finish_member_declaration ($1);
 		  current_aggr = NULL_TREE;
 		  reset_type_access_control ();
 		}
 	| component_decl_list component_decl
-		{
+		{
 		  finish_member_declaration ($2);
 		  current_aggr = NULL_TREE;
 		  reset_type_access_control ();
@@ -2637,7 +2637,7 @@
 		{ $$ = $2;
 		  pedantic = $1; }
         | template_header component_decl
-                {
+                {
 		  if ($2)
 		    $$ = finish_member_template_decl ($2);
 		  else
@@ -2647,8 +2647,8 @@
 		  finish_template_decl ($1);
 		}
 	| template_header typed_declspecs ';'
-                {
-		  $$ = finish_member_class_template ($2.t);
+                {
+		  $$ = finish_member_class_template ($2.t);
 		  finish_template_decl ($1);
 		}
 	| bad_decl
@@ -2681,10 +2681,10 @@
 		  $$ = NULL_TREE;
 		}
 	| declmods notype_components
-		{
+		{
 		  if (!$2)
 		    grok_x_components ($1.t);
-		  $$ = NULL_TREE;
+		  $$ = NULL_TREE;
 		}
 	| notype_declarator maybeasm maybe_attribute maybe_init
 		{ $$ = grokfield ($$, NULL_TREE, $4, $2, $3); }
@@ -2720,14 +2720,14 @@
 	  /* empty: possibly anonymous */
                 { $$ = 0; }
 	| component_declarator0
-                {
+                {
 		  if (PROCESSING_REAL_TEMPLATE_DECL_P ())
 		    $1 = finish_member_template_decl ($1);
-		  finish_member_declaration ($1);
+		  finish_member_declaration ($1);
 		  $$ = 1;
 		}
 	| components ',' component_declarator
-                {
+                {
 		  check_multiple_declarators ();
 		  if (PROCESSING_REAL_TEMPLATE_DECL_P ())
 		    $3 = finish_member_template_decl ($3);
@@ -2740,18 +2740,18 @@
 	  /* empty: possibly anonymous */
                 { $$ = 0; }
 	| notype_component_declarator0
-                {
+                {
 		  if (PROCESSING_REAL_TEMPLATE_DECL_P ())
 		    $1 = finish_member_template_decl ($1);
 		  finish_member_declaration ($1);
 		  $$ = 1;
 		}
 	| notype_components ',' notype_component_declarator
-                {
+                {
 		  check_multiple_declarators ();
 		  if (PROCESSING_REAL_TEMPLATE_DECL_P ())
 		    $3 = finish_member_template_decl ($3);
-		  finish_member_declaration ($3);
+		  finish_member_declaration ($3);
 		  $$ = 2;
 		}
 	;
@@ -2770,7 +2770,7 @@
 	  after_type_declarator maybeasm maybe_attribute maybe_init
 		{ $$ = parse_field0 ($1, $<ftype>0.t, $<ftype>0.lookups,
 				     $3, $2, $4); }
-	| TYPENAME ':' expr_no_commas maybe_attribute
+	| tTYPENAME ':' expr_no_commas maybe_attribute
 		{ $$ = parse_bitfield0 ($1, $<ftype>0.t, $<ftype>0.lookups,
 					$4, $3); }
 	;
@@ -2793,7 +2793,7 @@
 after_type_component_declarator:
 	  after_type_declarator maybeasm maybe_attribute maybe_init
 		{ $$ = parse_field ($1, $3, $2, $4); }
-	| TYPENAME ':' expr_no_commas maybe_attribute
+	| tTYPENAME ':' expr_no_commas maybe_attribute
 		{ $$ = parse_bitfield ($1, $4, $3); }
 	;

@@ -2830,10 +2830,10 @@
 /* ISO new-type-id (5.3.4) */
 new_type_id:
 	  type_specifier_seq new_declarator
-		{ $$.t = build_tree_list ($1.t, $2);
+		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| type_specifier_seq  %prec EMPTY
-		{ $$.t = build_tree_list ($1.t, NULL_TREE);
+		{ $$.t = build_tree_list ($1.t, NULL_TREE);
 		  $$.new_type_flag = $1.new_type_flag; }
 	/* GNU extension to allow arrays of arbitrary types with
 	   non-constant dimension.  */
@@ -2859,13 +2859,13 @@
 		{ $$.t = hash_tree_cons (NULL_TREE, $1, NULL_TREE);
 		  $$.new_type_flag = 0; }
 	| nonempty_cv_qualifiers CV_QUALIFIER
-		{ $$.t = hash_tree_cons (NULL_TREE, $2, $1.t);
+		{ $$.t = hash_tree_cons (NULL_TREE, $2, $1.t);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| attributes %prec EMPTY
-		{ $$.t = hash_tree_cons ($1, NULL_TREE, NULL_TREE);
+		{ $$.t = hash_tree_cons ($1, NULL_TREE, NULL_TREE);
 		  $$.new_type_flag = 0; }
 	| nonempty_cv_qualifiers attributes %prec EMPTY
-		{ $$.t = hash_tree_cons ($2, NULL_TREE, $1.t);
+		{ $$.t = hash_tree_cons ($2, NULL_TREE, $1.t);
 		  $$.new_type_flag = $1.new_type_flag; }
 	;

@@ -2974,7 +2974,7 @@
 		  $$ = tree_cons ($1, $2, NULL_TREE);
 		}
 	;
-
+
 notype_declarator:
 	  '*' nonempty_cv_qualifiers notype_declarator_intern  %prec UNARY
 		{ $$ = make_pointer_declarator ($2.t, $3); }
@@ -3022,7 +3022,7 @@
                 { enter_scope_of ($2); $$ = $2;}
 	| global_scope notype_unqualified_id
                 { $$ = build_nt (SCOPE_REF, global_namespace, $2);
-		  enter_scope_of ($$);
+		  enter_scope_of ($$);
 		}
         | nested_name_specifier notype_template_declarator
                 { got_scope = NULL_TREE;
@@ -3065,7 +3065,7 @@
 	;

 type_name:
-	  TYPENAME
+	  tTYPENAME
 	| SELFNAME
 	| template_type  %prec EMPTY
 	;
@@ -3075,21 +3075,21 @@
 	| nested_name_specifier nested_name_specifier_1
 		{ $$ = $2; }
 	| nested_name_specifier TEMPLATE explicit_template_type SCOPE
-                { got_scope = $$
+                { got_scope = $$
 		    = make_typename_type ($1, $3, tf_error); }
 	/* Error handling per Core 125.  */
 	| nested_name_specifier IDENTIFIER SCOPE
-                { got_scope = $$
+                { got_scope = $$
 		    = make_typename_type ($1, $2, tf_error); }
 	| nested_name_specifier PTYPENAME SCOPE
-                { got_scope = $$
+                { got_scope = $$
 		    = make_typename_type ($1, $2, tf_error); }
 	;

 /* Why the @#$%^& do type_name and notype_identifier need to be expanded
    inline here?!?  (jason) */
 nested_name_specifier_1:
-	  TYPENAME SCOPE
+	  tTYPENAME SCOPE
 		{
 		  if (TREE_CODE ($1) == IDENTIFIER_NODE)
 		    {
@@ -3165,17 +3165,17 @@
 		    }
 		}
 	| typename_sub1 explicit_template_type SCOPE
-                { got_scope = $$
+                { got_scope = $$
 		    = make_typename_type ($1, $2, tf_error); }
 	| typename_sub1 TEMPLATE explicit_template_type SCOPE
-                { got_scope = $$
+                { got_scope = $$
 		    = make_typename_type ($1, $3, tf_error); }
 	;

 /* This needs to return a TYPE_DECL for simple names so that we don't
    forget what name was used.  */
 typename_sub2:
-	  TYPENAME SCOPE
+	  tTYPENAME SCOPE
 		{
 		  if (TREE_CODE ($1) != TYPE_DECL)
 		    $$ = lastiddecl;
@@ -3276,7 +3276,7 @@
 		  $$ = tree_cons ($1, $2, NULL_TREE);
 		}
 	;
-
+
 /* ISO abstract-declarator (8.1) */
 absdcl:
 	  '*' nonempty_cv_qualifiers absdcl_intern
@@ -3362,7 +3362,7 @@

 label_decl:
 	  LABEL identifiers_or_typenames ';'
-                {
+                {
 		  while ($2)
 		    {
 		      finish_label_decl (TREE_VALUE ($2));
@@ -3374,7 +3374,7 @@
 compstmt_or_stmtexpr:
 	  save_lineno '{'
                 { $<ttype>$ = begin_compound_stmt (0); }
-	  compstmtend
+	  compstmtend
                 { STMT_LINENO ($<ttype>3) = $1;
 		  finish_compound_stmt (0, $<ttype>3); }
 	;
@@ -3397,9 +3397,9 @@

 implicitly_scoped_stmt:
 	  compstmt
-	|
+	|
 		{ $<ttype>$ = begin_compound_stmt (0); }
-	  save_lineno simple_stmt
+	  save_lineno simple_stmt
 		{ STMT_LINENO ($<ttype>1) = $2;
 		  if ($3) STMT_LINENO ($3) = $2;
 		  finish_compound_stmt (0, $<ttype>1); }
@@ -3420,9 +3420,9 @@
 	| simple_if ELSE
                 { begin_else_clause (); }
 	  implicitly_scoped_stmt
-                {
+                {
 		  $$ = $1;
-		  finish_else_clause ($1);
+		  finish_else_clause ($1);
 		  finish_if_stmt ();
 		}
 	| simple_if  %prec IF
@@ -3459,7 +3459,7 @@
 	  implicitly_scoped_stmt
                 { $$ = $<ttype>2;
 		  finish_for_stmt ($<ttype>2); }
-	| SWITCH
+	| SWITCH
                 { $<ttype>$ = begin_switch_stmt (); }
 	    '(' condition ')'
                 { finish_switch_cond ($4, $<ttype>2); }
@@ -3510,7 +3510,7 @@
 	  asm_clobbers ')' ';'
 		{ $$ = finish_asm_stmt ($2, $4, $6, NULL_TREE, $8); }
 	| GOTO '*' expr ';'
-                {
+                {
 		  if (pedantic)
 		    pedwarn ("ISO C++ forbids computed gotos");
 		  $$ = finish_goto_stmt ($3);
@@ -3601,7 +3601,7 @@
 		  expand_start_catch_block ($2.t, $3); }
 	This allows reference parameters...  */
 	| '(' parm ')'
-		{
+		{
 		  check_for_new_type ("inside exception declarations", $2);
 		  $$ = start_handler_parms (TREE_PURPOSE ($2.t),
 					    TREE_VALUE ($2.t));
@@ -3613,7 +3613,7 @@
                 { finish_label_stmt ($1); }
 	| PTYPENAME ':'
                 { finish_label_stmt ($1); }
-	| TYPENAME ':'
+	| tTYPENAME ':'
                 { finish_label_stmt ($1); }
 	| SELFNAME ':'
                 { finish_label_stmt ($1); }
@@ -3704,7 +3704,7 @@
                 { $$ = finish_parmlist ($1, 1); }
 	| type_id ELLIPSIS
                 { $$ = finish_parmlist (build_tree_list (NULL_TREE,
-							 $1.t), 1); }
+							 $1.t), 1); }
 	| ELLIPSIS
                 { $$ = finish_parmlist (NULL_TREE, 1); }
 	| parms ':'
@@ -3724,7 +3724,7 @@
 		     parenthesis.  */
 		  yyerror ("possibly missing ')'");
 		  $$ = finish_parmlist (build_tree_list (NULL_TREE,
-							 $1.t), 0);
+							 $1.t), 0);
 		  yyungetc (':', 0);
 		  yychar = ')';
 		}
@@ -3776,20 +3776,20 @@
 		{ $$.new_type_flag = $1.new_type_flag;
 		  $$.t = build_tree_list ($1.t, $2); }
 	| typed_typespecs declarator
-		{ $$.t = build_tree_list ($1.t, $2);
+		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typespec declarator
 		{ $$.t = build_tree_list (build_tree_list (NULL_TREE, $1.t),
-					  $2);
+					  $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typed_declspecs1 absdcl
 		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| typed_declspecs1  %prec EMPTY
-		{ $$.t = build_tree_list ($1.t, NULL_TREE);
+		{ $$.t = build_tree_list ($1.t, NULL_TREE);
 		  $$.new_type_flag = $1.new_type_flag; }
 	| declmods notype_declarator
-		{ $$.t = build_tree_list ($1.t, $2);
+		{ $$.t = build_tree_list ($1.t, $2);
 		  $$.new_type_flag = 0; }
 	;

Index: spew.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/spew.c,v
retrieving revision 1.65
diff -u -u -r1.65 spew.c
--- spew.c 4 Jun 2002 07:10:23 -0000 1.65
+++ spew.c 10 Jun 2002 14:34:09 -0000
@@ -86,7 +86,7 @@
   struct token_chunk * tokens; /* Start of the token list.  */

   struct token_chunk *last_chunk; /* End of the token list.  */
-  short last_pos;	/* Number of tokens used in the last chunk of
+  short last_pos;	/* Number of tokens used in the last chunk of
 			   TOKENS. */

   short cur_pos;	/* Current token in 'cur_chunk', when rescanning.  */
@@ -126,7 +126,7 @@
 static SPEW_INLINE int read_process_identifier PARAMS ((YYSTYPE *));

 static SPEW_INLINE void feed_input PARAMS ((struct unparsed_text *));
-static SPEW_INLINE struct token * space_for_token
+static SPEW_INLINE struct token * space_for_token
   PARAMS ((struct unparsed_text *t));
 static SPEW_INLINE struct token * remove_last_token
   PARAMS ((struct unparsed_text *t));
@@ -161,10 +161,11 @@
 static tree last_token_id;

 /* From lex.c: */
-/* the declaration found for the last IDENTIFIER token read in.
-   yylex must look this up to detect typedefs, which get token type TYPENAME,
-   so it is left around in case the identifier is not a typedef but is
-   used in a context which makes it a reference to a variable.  */
+/* the declaration found for the last IDENTIFIER token read in.  yylex
+   must look this up to detect typedefs, which get token type
+   tTYPENAME, so it is left around in case the identifier is not a
+   typedef but is used in a context which makes it a reference to a
+   variable.  */
 extern tree lastiddecl;		/* let our brains leak out here too */
 extern int	yychar;		/*  the lookahead symbol		*/
 extern YYSTYPE	yylval;		/*  the semantic value of the		*/
@@ -178,7 +179,7 @@
    through and parse all of them using do_pending_defargs.  Since yacc
    parsers are not reentrant, we retain defargs state in these two
    variables so that subsequent calls to do_pending_defargs can resume
-   where the previous call left off. DEFARG_FNS is a tree_list where
+   where the previous call left off. DEFARG_FNS is a tree_list where
    the TREE_TYPE is the current_class_type, TREE_VALUE is the FUNCTION_DECL,
    and TREE_PURPOSE is the list unprocessed dependent functions.  */

@@ -359,7 +360,7 @@
     case CPP_EOF:
       t->yychar = 0;
       break;
-
+
     case CPP_NAME:
       t->yychar = read_process_identifier (&t->yylval);
       break;
@@ -486,12 +487,12 @@
 	  feed->input->cur_chunk = feed->input->cur_chunk->next;
 	  feed->input->cur_pos = 0;
 	}
-      memcpy (t, feed->input->cur_chunk->toks + feed->input->cur_pos,
+      memcpy (t, feed->input->cur_chunk->toks + feed->input->cur_pos,
 	      sizeof (struct token));
       feed->input->cur_pos++;
       return t->yychar;
     }
-
+
   memcpy (t, &Teosi, sizeof (struct token));
   return END_OF_SAVED_INPUT;
 }
@@ -579,7 +580,7 @@
 	goto pad_tokens;
     }
   return;
-
+
  pad_tokens:
   while (num_tokens () <= n)
     obstack_grow (&token_obstack, &Tpad, sizeof (struct token));
@@ -605,7 +606,7 @@
     {
       if (TREE_CODE (DECL_TEMPLATE_RESULT (decl)) == TYPE_DECL)
 	return PTYPENAME;
-      else if (looking_for_template)
+      else if (looking_for_template)
 	return PFUNCNAME;
     }
   if (looking_for_template && really_overloaded_fn (decl))
@@ -615,7 +616,7 @@
 	decl = TREE_VALUE (decl);

       for (t = decl; t != NULL_TREE; t = OVL_CHAIN (t))
-	if (DECL_FUNCTION_TEMPLATE_P (OVL_FUNCTION (t)))
+	if (DECL_FUNCTION_TEMPLATE_P (OVL_FUNCTION (t)))
 	  return PFUNCNAME;
     }
   if (TREE_CODE (decl) == NAMESPACE_DECL)
@@ -636,11 +637,11 @@
   if (t && t == decl)
     return SELFNAME;

-  return TYPENAME;
+  return tTYPENAME;
 }

 /* token[0] == AGGR (struct/union/enum)
-   Thus, token[1] is either a TYPENAME or a TYPENAME_DEFN.
+   Thus, token[1] is either a tTYPENAME or a TYPENAME_DEFN.
    If token[2] == '{' or ':' then it's TYPENAME_DEFN.
    It's also a definition if it's a forward declaration (as in 'struct Foo;')
    which we can tell if token[2] == ';' *and* token[-1] != FRIEND or NEW.  */
@@ -649,10 +650,10 @@
 do_aggr ()
 {
   int yc1, yc2;
-
+
   scan_tokens (2);
   yc1 = nth_token (1)->yychar;
-  if (yc1 != TYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME)
+  if (yc1 != tTYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME)
     return;
   yc2 = nth_token (2)->yychar;
   if (yc2 == ';')
@@ -667,7 +668,7 @@

   switch (yc1)
     {
-    case TYPENAME:
+    case tTYPENAME:
       nth_token (1)->yychar = TYPENAME_DEFN;
       break;
     case PTYPENAME:
@@ -679,7 +680,7 @@
     default:
       abort ();
     }
-}
+}

 void
 see_typename ()
@@ -739,7 +740,7 @@
     {
     case EMPTY:
       /* This is a lexical no-op.  */
-#ifdef SPEW_DEBUG
+#ifdef SPEW_DEBUG
       if (spew_debug)
 	debug_yychar (yychr);
 #endif
@@ -758,14 +759,14 @@
     case IDENTIFIER:
     {
       int peek;
-
+
       scan_tokens (1);
       peek = nth_token (1)->yychar;
       yychr = frob_id (yychr, peek, &nth_token (0)->yylval.ttype);
       break;
     }
     case IDENTIFIER_DEFN:
-    case TYPENAME:
+    case tTYPENAME:
     case TYPENAME_DEFN:
     case PTYPENAME:
     case PTYPENAME_DEFN:
@@ -831,13 +832,13 @@
   yychar = yychr;
   {
     struct token *tok = nth_token (0);
-
+
     yylval = tok->yylval;
     if (tok->lineno)
       lineno = tok->lineno;
   }

-#ifdef SPEW_DEBUG
+#ifdef SPEW_DEBUG
   if (spew_debug)
     debug_yychar (yychr);
 #endif
@@ -883,7 +884,7 @@
 {
   tree trrr;
   int old_looking_for_typename = 0;
-
+
   if (peek == SCOPE)
     {
       /* Don't interfere with the setting from an 'aggr' prefix.  */
@@ -898,7 +899,7 @@
       yyc = identifier_type (trrr);
       switch(yyc)
         {
-          case TYPENAME:
+          case tTYPENAME:
           case SELFNAME:
           case NSNAME:
           case PTYPENAME:
@@ -1042,7 +1043,7 @@
   t->last_chunk->next = ggc_alloc (sizeof (*t->last_chunk->next));
   t->last_chunk = t->last_chunk->next;
   t->last_chunk->next = NULL;
-
+
   t->last_pos = 1;
   return t->last_chunk->toks;
 }
@@ -1134,7 +1135,7 @@
 	    {
 	      if (!look_for_catch)
 		break;
-
+
 	      if (next_token (space_for_token (t)) != CATCH)
 		{
 		  push_token (remove_last_token (t));
@@ -1149,7 +1150,7 @@
 	  if (look_for_lbrac)
 	    {
 	      struct token *fake;
-
+
 	      error ("function body for constructor missing");
 	      /* fake a { } to avoid further errors */
 	      fake = space_for_token (t);
@@ -1183,7 +1184,7 @@
   struct unparsed_text *meth;

   meth = alloc_unparsed_text (starting_filename, starting_lineno, decl,
-			      (interface_unknown ? 1
+			      (interface_unknown ? 1
 			       : (interface_only ? 0 : 2)));

   snarf_block (meth);
@@ -1284,7 +1285,7 @@
     TREE_VALUE (defarg_fns) = decl;
   else
     {
-      defarg_fns = tree_cons (NULL_TREE, decl, defarg_fns);
+      defarg_fns = tree_cons (NULL_TREE, decl, defarg_fns);
       TREE_TYPE (defarg_fns) = current_class_type;
     }
 }
@@ -1313,7 +1314,7 @@
     error ("parse error at end of saved function text");

   end_input ();
-}
+}

 /* Main function for deferred parsing of default arguments.  Called from
    the parser.  */
@@ -1327,7 +1328,7 @@
   for (; defarg_fns;)
     {
       tree current = defarg_fns;
-
+
       tree defarg_fn = TREE_VALUE (defarg_fns);
       if (defarg_parm == NULL_TREE)
 	{
@@ -1367,7 +1368,7 @@

       poplevel (0, 0, 0);
       pop_nested_class ();
-
+
       defarg_fns = TREE_CHAIN (defarg_fns);
       if (defarg_depfns)
         {
@@ -1375,8 +1376,8 @@
              of defarg_fns. We will need to reprocess this function, and
              check for circular dependencies.  */
           tree a, b;
-
-          for (a = defarg_depfns, b = TREE_PURPOSE (current); a && b;
+
+          for (a = defarg_depfns, b = TREE_PURPOSE (current); a && b;
                a = TREE_CHAIN (a), b = TREE_CHAIN (b))
             if (TREE_VALUE (a) != TREE_VALUE (b))
               goto different;
@@ -1392,7 +1393,7 @@
               cp_warning_at ("circular dependency in default args of `%#D'", defarg_fn);
               /* No need to say what else is dependent, as they will be
                  picked up in another pass.  */
-
+
               /* Immediately repeat, but marked so that we break the loop. */
               defarg_fns = current;
               TREE_PURPOSE (current) = error_mark_node;
@@ -1413,7 +1414,7 @@
     {
       tree fn = TREE_VALUE (defarg_fnsdone);
       tree parms;
-
+
       if (TREE_CODE (fn) == FUNCTION_DECL)
         parms = TYPE_ARG_TYPES (TREE_TYPE (fn));
       else
@@ -1460,7 +1461,7 @@
     }
 }

-#ifdef SPEW_DEBUG
+#ifdef SPEW_DEBUG
 /* debug_yychar takes a yychar (token number) value and prints its name.  */

 static void
@@ -1469,7 +1470,7 @@
 {
   if (yy<256)
     fprintf (stderr, "->%d < %c >\n", lineno, yy);
-  else if (yy == IDENTIFIER || yy == TYPENAME)
+  else if (yy == IDENTIFIER || yy == tTYPENAME)
     {
       const char *id;
       if (TREE_CODE (yylval.ttype) == IDENTIFIER_NODE)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]