This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
template<typename T> struct A { typedef struct typename T::X X; };
The patch to fix this is simple, when the diagnostic is issued about duplicate data types for a declaration, return error_mark_node to mark it as invalid which is what the attached patch does.
Bootstrapped and regression tested with no new failures on i686-pc-linux-gnu, ok for mainline?
Cheers, Lee.
PR c++/28303 * decl.c (grokdeclarator): Return error_mark_node on declaration with two or more data types.
PR c++/28303 * g++.dg/template/typedef6.C: New test. * g++.dg/init/error1.C: Adjust error markers. * g++.dg/parse/crash9.C: Likewise. * g++.dg/template/crash55.C: Likewise.
Attachment:
pr28303.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |