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]

RE: ObjC patch - do not replace token->value w ith canonical spelling


ping :-)

Thanks

-----Original Message-----
From: "Nicola Pero" <nicola.pero@meta-innovation.com>
Sent: Wednesday, 22 September, 2010 00:31
To: gcc-patches@gnu.org
Subject: ObjC patch - do not replace token->value with canonical spelling

This one-liner patch removes a difference between the Objective-C 
and C/C++/Objective-C++ parsers (it's the first of a set of patches 
- this tiny difference prevents me from moving code around in more 
interesting patches later, so I want to get it out of the way first) ;-)

No regressions.  Ok to apply ?

Thanks

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog       (revision 164498)
+++ gcc/ChangeLog       (working copy)
@@ -1,3 +1,9 @@
+2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * c-parser.c (c_lex_one_token): In Objective-C, do not replace
+       token->value with the canonical spelling.  Do exactly like C and
+       C++ and leave it as it is.
+
 2010-09-21  Anatoly Sokolov  <aesok@post.ru>
 
        * config/rs6000/rs6000.h (OUTPUT_ADDR_CONST_EXTRA): Remove macros.
Index: gcc/c-parser.c
===================================================================
--- gcc/c-parser.c      (revision 164498)
+++ gcc/c-parser.c      (working copy)
@@ -242,8 +242,6 @@ c_lex_one_token (c_parser *parser, c_token *token)
                    && (!OBJC_IS_PQ_KEYWORD (rid_code)
                        || parser->objc_pq_context))
                  {
-                   /* Return the canonical spelling for this keyword.  */
-                   token->value = ridpointers[(int) rid_code];
                    token->type = CPP_KEYWORD;
                    token->keyword = rid_code;
                    break;





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