Commit 0172e2bc by Alexandre Oliva Committed by Alexandre Oliva

* cpplib.c (do_pragma): Accept #pragma without consecutive token.

From-SVN: r32211
parent 22e92ac3
2000-02-27 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* cpplib.c (do_pragma): Accept #pragma without consecutive token.
2000-02-26 Mark Mitchell <mark@codesourcery.com> 2000-02-26 Mark Mitchell <mark@codesourcery.com>
* integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE * integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE
......
...@@ -1615,14 +1615,21 @@ do_pragma (pfile, keyword) ...@@ -1615,14 +1615,21 @@ do_pragma (pfile, keyword)
long here, key; long here, key;
U_CHAR *buf; U_CHAR *buf;
int pop; int pop;
enum cpp_token token;
here = CPP_WRITTEN (pfile); here = CPP_WRITTEN (pfile);
CPP_PUTS (pfile, "#pragma ", 8); CPP_PUTS (pfile, "#pragma ", 8);
key = CPP_WRITTEN (pfile); key = CPP_WRITTEN (pfile);
pfile->no_macro_expand++; pfile->no_macro_expand++;
if (get_directive_token (pfile) != CPP_NAME) token = get_directive_token (pfile);
goto skip; if (token != CPP_NAME)
{
if (token == CPP_VSPACE)
goto empty;
else
goto skip;
}
buf = pfile->token_buffer + key; buf = pfile->token_buffer + key;
CPP_PUTC (pfile, ' '); CPP_PUTC (pfile, ' ');
...@@ -1649,6 +1656,7 @@ do_pragma (pfile, keyword) ...@@ -1649,6 +1656,7 @@ do_pragma (pfile, keyword)
skip: skip:
cpp_error (pfile, "malformed #pragma directive"); cpp_error (pfile, "malformed #pragma directive");
skip_rest_of_line (pfile); skip_rest_of_line (pfile);
empty:
CPP_SET_WRITTEN (pfile, here); CPP_SET_WRITTEN (pfile, here);
pfile->no_macro_expand--; pfile->no_macro_expand--;
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment