Patchwork =?UTF-8?Q?RE:=20ObjC=20patch=20-=20do=20not=20replace=20token->value=20w?= =?UTF-8?Q?ith=20canonical=20spelling?=

login
register
mail settings
Submitter Nicola Pero
Date Sept. 28, 2010, 5:39 p.m.
Message ID <1285695540.43523430@192.168.2.229>
Download mbox | patch
Permalink /patch/66008/
State New
Headers show

Comments

Nicola Pero - Sept. 28, 2010, 5:39 p.m.
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

Patch

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;