Hi, The problem here seems to be that we don't perform the enumeration constant resolving in finish_id_expression when the DECL is a USING_DECL. Consequently, I think we shall strip the USING_DECL before checking for a CONST_DECL.
Tested x86_64-unknown-linux-gnu without regressions. OK to commit ? gcc/testsuite/ChangeLog 2011-12-02 Fabien Chêne <fab...@gcc.gnu.org> PR c++/51319 * g++.dg/lookup/using50.C: New. * g++.dg/lookup/using51.C: New. gcc/cp/ChangeLog 2011-12-02 Fabien Chêne <fab...@gcc.gnu.org> PR c++/51319 * semantics.c (finish_id_expression): Strip using declaration when resolving enumeration constants to their underlying values. -- Fabien
51319.patch
Description: Binary data