aboutsummaryrefslogtreecommitdiff
path: root/gcc/tradcpp.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-07-19 20:37:26 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-07-19 20:37:26 +0000
commit53fdf0be639dbf77f048327f84f3eb1e17972d50 (patch)
tree04680f86f8f4f50dd092058debe0d45d07bd72f9 /gcc/tradcpp.c
parent0fab9d0a5db8322d0a2711fb2228a99f6e317df3 (diff)
downloadgcc-53fdf0be639dbf77f048327f84f3eb1e17972d50.zip
gcc-53fdf0be639dbf77f048327f84f3eb1e17972d50.tar.gz
gcc-53fdf0be639dbf77f048327f84f3eb1e17972d50.tar.bz2
tradcpp.c (rescan): Do not recognize directives when the # is indented.
* tradcpp.c (rescan): Do not recognize directives when the # is indented. * gcc.dg/cpp/tr-direct.c: New test. From-SVN: r35139
Diffstat (limited to 'gcc/tradcpp.c')
-rw-r--r--gcc/tradcpp.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c
index 971dfef..d48510c 100644
--- a/gcc/tradcpp.c
+++ b/gcc/tradcpp.c
@@ -1187,32 +1187,11 @@ do { ip = &instack[indepth]; \
if (ident_length)
goto specialchar;
- /* # keyword: a # must be first nonblank char on the line */
+ /* # keyword: a # must be the first char on the line */
if (beg_of_line == 0)
goto randomchar;
- {
- U_CHAR *bp;
-
- /* Scan from start of line, skipping whitespace, comments
- and backslash-newlines, and see if we reach this #.
- If not, this # is not special. */
- bp = beg_of_line;
- while (1) {
- if (is_hor_space[*bp])
- bp++;
- else if (*bp == '\\' && bp[1] == '\n')
- bp += 2;
- else if (*bp == '/' && (newline_fix (bp + 1), bp[1]) == '*') {
- bp += 2;
- while (!(*bp == '*' && (newline_fix (bp + 1), bp[1]) == '/'))
- bp++;
- bp += 1;
- }
- else break;
- }
- if (bp + 1 != ibp)
- goto randomchar;
- }
+ if (beg_of_line + 1 != ibp)
+ goto randomchar;
/* This # can start a directive. */