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 57734


Hi,

this issue points out that we aren't handling correctly alias template declarations of enums. The core problem in lookup_template_class_1 is easy to spot: we check for (and handle) TREE_CODE (template_type) == ENUMERAL_TYPE *before* DECL_ALIAS_TEMPLATE_P (gen_tmpl). Besides this more or less straightforward change, in the patchlet I also have to avoid calling tsubst_enum (otherwise we immediately have duplicate declarations for the enumerators of unscoped enums, and all sorts of troubles: I tried to cover in the extended testcase some of the weird things I was seeing earlier today ;) Tested x86_64-linux.

Thanks!
Paolo.

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

Attachment: CL_57734
Description: Text document

Attachment: patch_57734
Description: Text document


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