Commit 3620711b by Neil Booth Committed by Neil Booth

re PR preprocessor/6780 (Incorrect diagnosis of token pasting)

	PR preprocessor/6780
	* cppmacro.c (enter_macro_context): Clear state.angled_headers.
testsuite:
	* gcc.dg/cpp/paste12.c: New test.

From-SVN: r53851
parent 2f8d482e
2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
PR preprocessor/6780
* cppmacro.c (enter_macro_context): Clear state.angled_headers.
2002-05-24 Jim Blandy <jimb@redhat.com> 2002-05-24 Jim Blandy <jimb@redhat.com>
* dwarf2out.c (dwarf2out_finish): Don't forget to emit a final * dwarf2out.c (dwarf2out_finish): Don't forget to emit a final
......
...@@ -660,6 +660,8 @@ enter_macro_context (pfile, node) ...@@ -660,6 +660,8 @@ enter_macro_context (pfile, node)
/* The presence of a macro invalidates a file's controlling macro. */ /* The presence of a macro invalidates a file's controlling macro. */
pfile->mi_valid = false; pfile->mi_valid = false;
pfile->state.angled_headers = false;
/* Handle standard macros. */ /* Handle standard macros. */
if (! (node->flags & NODE_BUILTIN)) if (! (node->flags & NODE_BUILTIN))
{ {
......
2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/paste12.c: New test.
2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* g++.dg/parse/named_ops.C: New test. * g++.dg/parse/named_ops.C: New test.
......
/* { dg-do preprocess } */
/* Test correct diagnostics when pasting in #include.
Source: PR preprocessor/6780. */
#define inc2(a,b) <##a.b>
#define INC(X) inc2(X,h)
#include INC(stdio) /* { dg-error "pasting \"<\" and \"stdio\" does not" } */
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