aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-10-05 16:04:55 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-10-05 16:04:55 -0400
commit9e92edb4fb04f8584a4900857bd86758e62f3099 (patch)
tree59f460633a0af643c004d93c1b7ec85b00ec3d67
parent99f4f5b7fa36ea0d6d3fb38bfba916c908dc85ca (diff)
downloadgcc-9e92edb4fb04f8584a4900857bd86758e62f3099.zip
gcc-9e92edb4fb04f8584a4900857bd86758e62f3099.tar.gz
gcc-9e92edb4fb04f8584a4900857bd86758e62f3099.tar.bz2
(rescan): Don't expand an identifier after a '#'.
From-SVN: r5611
-rw-r--r--gcc/cccp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index ebd8416..e1a654e 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -2465,6 +2465,15 @@ do { ip = &instack[indepth]; \
break;
}
++obp; /* Copy the '#' after all */
+ /* Don't expand an identifier that could be a macro directive.
+ (Section 3.8.3 of the ANSI C standard) */
+ SKIP_WHITE_SPACE (ibp);
+ if (is_idstart[*ibp])
+ {
+ *obp++ = *ibp++;
+ while (is_idchar[*ibp])
+ *obp++ = *ibp++;
+ }
goto randomchar;
}
#ifdef USE_C_ALLOCA