This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ patch] PR 20420
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Wed, 22 Aug 2012 14:43:42 +0200
- Subject: [C++ patch] PR 20420
Hi,
yesterday I had a look to this old PR and noticed that we are almost
doing already the right thing for the original testcase: we are for
classes, but we ICE (something recent) for enums. The latter issue seems
easy to fix: handle specially enums at the beginning of
supplement_binding_1 only when the comment says, that is in templates
(otherwise we hit an assert in dependent_type_p).
Then, Comment #4 in the audit trail added a case of duplicate using
declaration which we should also reject, involving VAR_DECLs at function
scope (C++11 7.3.3/10). Seems also easy to fix, by checking the return
value of validate_nonmember_using_decl at the beginning of
do_local_using_decl and erroring out if it's null.
Tested x86_64-linux.
Thanks,
Paolo.
///////////////////////////
Attachment:
CL_20420
Description: Text document
Attachment:
patch_20420
Description: Text document