]> gcc.gnu.org Git - gcc.git/commitdiff
* c-common.c (builtin_define_std): Correct logic.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Fri, 31 May 2002 06:01:18 +0000 (06:01 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Fri, 31 May 2002 06:01:18 +0000 (06:01 +0000)
From-SVN: r54089

gcc/ChangeLog
gcc/c-common.c

index 90bbe7e7e68d56cbca5dd1551033db329e88dc14..151362c85e02a98c85a75162125a34db55c4a7f9 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-31  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * c-common.c (builtin_define_std): Correct logic.
+
 2002-05-31  John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20.
index 8a554e894666f971ab2c33b6a0038658fb9fed51..e1633cb9ca43c9f8624d0b84f871f794a8e519fe 100644 (file)
@@ -4440,10 +4440,13 @@ builtin_define_std (macro)
 
   /* prepend __ (or maybe just _) if in user's namespace.  */
   memcpy (p, macro, len + 1);
-  if (*p != '_')
-    *--p = '_';
-  if (p[1] != '_' && !ISUPPER (p[1]))
-    *--p = '_';
+  if (!( *p == '_' && (p[1] == '_' || ISUPPER (p[1]))))
+    {
+      if (*p != '_')
+       *--p = '_';
+      if (p[1] != '_')
+       *--p = '_';
+    }
   cpp_define (parse_in, p);
 
   /* If it was in user's namespace...  */
This page took 0.083812 seconds and 5 git commands to generate.