shebs 02/08/12 22:53:57
Modified: gcc/cp spew.c
Log:
Fix id handling for ObjC++.
Revision Changes Path
1.35 +4 -22 gcc3/gcc/cp/spew.c
Index: spew.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/cp/spew.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- spew.c 2002/08/07 03:13:26 1.34
+++ spew.c 2002/08/13 05:53:56 1.35
@@ -213,28 +213,15 @@
tree id = pyylval->ttype;
/* APPLE LOCAL AltiVec */
- /* APPLE LOCAL Objective-C++ */
+ /* APPLE LOCAL begin Objective-C++ */
if (C_IS_RESERVED_WORD (id)
&& (!compiling_objc
|| (!OBJC_IS_AT_KEYWORD (C_RID_CODE (id))
&& (!OBJC_IS_PQ_KEYWORD (C_RID_CODE (id)) || objc_pq_context)))
&& altivec_treat_as_keyword (id))
{
-#if 0 /* APPLE MERGE orphaned ObjC++ code */
- /* Possibly replace the IDENTIFIER_NODE with a magic cookie.
- Can't put yylval.code numbers in ridpointers[]. Bleah. */
-
switch (C_RID_CODE (id))
{
- case RID_BITAND: pyylval->code = BIT_AND_EXPR; return '&';
- case RID_AND_EQ: pyylval->code = BIT_AND_EXPR; return ASSIGN;
- case RID_BITOR: pyylval->code = BIT_IOR_EXPR; return '|';
- case RID_OR_EQ: pyylval->code = BIT_IOR_EXPR; return ASSIGN;
- case RID_XOR: pyylval->code = BIT_XOR_EXPR; return '^';
- case RID_XOR_EQ: pyylval->code = BIT_XOR_EXPR; return ASSIGN;
- case RID_NOT_EQ: pyylval->code = NE_EXPR; return EQCOMPARE;
-
- /* APPLE LOCAL begin Objective-C++ */
/* Turn non-typedefed refs to "id" into plain identifiers; this
allows constructs like "void foo(id id);" to work. */
case RID_ID:
@@ -256,7 +243,7 @@
if (next_tok_type == CPP_SEMICOLON)
return IDENTIFIER;
}
- goto get_ridpointer;
+ break;
case RID_CLASS:
if (compiling_objc && objc_need_raw_identifier
&& !processing_template_decl)
@@ -266,14 +253,9 @@
"this will be a hard error in the future"); */
return IDENTIFIER;
}
- /* fall through */
- default:
- get_ridpointer:
- /* APPLE LOCAL end Objective-C++ */
- pyylval->ttype = ridpointers[C_RID_CODE (id)];
- return C_RID_YYCODE (id);
+ break;
}
-#endif
+ /* APPLE LOCAL end Objective-C++ */
pyylval->ttype = ridpointers[C_RID_CODE (id)];
return C_RID_YYCODE (id);
}