OSDN Git Service

* c-common.c (builtin_define_std): Correct logic.
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 May 2002 06:01:18 +0000 (06:01 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 May 2002 06:01:18 +0000 (06:01 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54089 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.c

index 90bbe7e..151362c 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 8a554e8..e1633cb 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...  */