From: Richard Kenner Date: Thu, 30 Mar 1995 12:19:57 +0000 (-0500) Subject: (rescan): Don't recognize preprocessing directives within macro args. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3be5fb2398c72907ddf4ad7df062694c8d08b65c;p=gcc.git (rescan): Don't recognize preprocessing directives within macro args. Warn if one is found. From-SVN: r9257 --- diff --git a/gcc/cccp.c b/gcc/cccp.c index b4b6ef94ec1..ff8593ea33f 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -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;