OSDN Git Service

(rescan): Don't recognize preprocessing directives within macro args.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Mar 1995 12:19:57 +0000 (12:19 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Mar 1995 12:19:57 +0000 (12:19 +0000)
Warn if one is found.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9257 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cccp.c

index b4b6ef9..ff8593e 100644 (file)
@@ -2586,8 +2586,6 @@ do { ip = &instack[indepth];              \
     case '%':
       if (ident_length || ip->macro || traditional)
        goto randomchar;
-      if (ip->fname == 0 && beg_of_line == ip->buf)
-       goto randomchar;
       while (*ibp == '\\' && ibp[1] == '\n') {
        ibp += 2;
        ++ip->lineno;
@@ -2618,11 +2616,15 @@ do { ip = &instack[indepth];            \
         preprocessor directives.  */
       if (ip->macro != 0)
        goto randomchar;
-      /* If this is expand_into_temp_buffer, recognize them
+      /* If this is expand_into_temp_buffer,
+        don't recognize them either.  Warn about them
         only after an actual newline at this level,
         not at the beginning of the input level.  */
-      if (ip->fname == 0 && beg_of_line == ip->buf)
+      if (! ip->fname) {
+       if (ip->buf != beg_of_line)
+         warning ("preprocessing directive not recognized within macro arg");
        goto randomchar;
+      }
       if (ident_length)
        goto specialchar;