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]

[C++ Patch] PR 18747


Hi,

here we want to reject meaningless things like:

template<> int i; // { dg-error "template" }

struct A
{
};

template<> A j; // { dg-error "template" }

It seems to me that a good place to do that is toward the end of cp_parser_single_declaration, where we have only to be careful with static data members (otherwise, eg, debug/static1.C regresses immediately). I'm not sure about the error message...

The below bootstraps and tests fine on x86_64-linux.

Thanks,
Paolo.

/////////////////////

Attachment: CL_18747
Description: Text document

Attachment: patch_18747
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]