* c-common.c (builtin_define_std): Correct logic.

From-SVN: r54089
This commit is contained in:
Neil Booth 2002-05-31 06:01:18 +00:00 committed by Neil Booth
parent 6248c4ddc8
commit a9da2e5b38
2 changed files with 11 additions and 4 deletions

View 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.

View 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... */