summaryrefslogtreecommitdiff
path: root/gcc/tradcpp.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-19 20:37:26 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-19 20:37:26 +0000
commit1bce5e7d731cf6e2db498d6c08c6d6fc6278a8a1 (patch)
tree04680f86f8f4f50dd092058debe0d45d07bd72f9 /gcc/tradcpp.c
parenteb30405f30b136f65a3ea9e977ba73fc2159b7ca (diff)
downloadgcc-1bce5e7d731cf6e2db498d6c08c6d6fc6278a8a1.tar.gz
* tradcpp.c (rescan): Do not recognize directives when the #
is indented. * gcc.dg/cpp/tr-direct.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35139 138bc75d-0d04-0410-961f-82ee72b054a4
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 971dfeffdb1..d48510ce7ac 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. */