From: neil Date: Fri, 24 May 2002 19:26:30 +0000 (+0000) Subject: PR preprocessor/6780 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=606942e3df1248904b04cfa1d9389e2878518fbb;p=thirdparty%2Fgcc.git PR preprocessor/6780 * cppmacro.c (enter_macro_context): Clear state.angled_headers. testsuite: * gcc.dg/cpp/paste12.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53851 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29027a11361b..cfcc5fbeb047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-24 Neil Booth + + PR preprocessor/6780 + * cppmacro.c (enter_macro_context): Clear state.angled_headers. + 2002-05-24 Jim Blandy * dwarf2out.c (dwarf2out_finish): Don't forget to emit a final diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 40a9a0780453..d154c0ccb85d 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -660,6 +660,8 @@ enter_macro_context (pfile, node) /* The presence of a macro invalidates a file's controlling macro. */ pfile->mi_valid = false; + pfile->state.angled_headers = false; + /* Handle standard macros. */ if (! (node->flags & NODE_BUILTIN)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ae26d864ae1d..deabe47ee7aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-05-24 Neil Booth + + * gcc.dg/cpp/paste12.c: New test. + 2002-05-23 Neil Booth * g++.dg/parse/named_ops.C: New test. diff --git a/gcc/testsuite/gcc.dg/cpp/paste12.c b/gcc/testsuite/gcc.dg/cpp/paste12.c new file mode 100644 index 000000000000..e61ec51433c0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/paste12.c @@ -0,0 +1,8 @@ +/* { 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" } */