Hi,

Here, we weren't creating a typename_type for a dependent type
introduced by a using declaration. A USING_DECL was not recording the
fact that it refers to a dependent type, so I've created a new macro
USING_DECL_TYPENAME_P to record that information (using the free slot
DECL_LANG_FLAG_1 for USING_DECLs), and set it appropriately in
cp_parser_using_declaration.

Tested x86_64-unkown-linux-gnu, OK to commit ?

gcc/testsuite/ChangeLog

2011-12-11  Fabien Chêne  <fab...@gcc.gnu.org>

        PR c++/14258
        * g++.dg/template/using16.C: New.
        * g++.dg/template/using17.C: New.

gcc/cp/ChangeLog

2011-12-11  Fabien Chêne  <fab...@gcc.gnu.org>

        PR c++/14258
        * cp-tree.h (USING_DECL_TYPENAME_P): New macro.
        * parser.c (cp_parser_nonclass_name): Handle using declarations
        that refer to a dependent type.
        (cp_parser_using_declaration): Set USING_DECL_TYPENAME_P to 1 if
        the using declaration refers to a dependent type.

-- 
Fabien

Attachment: 14258.patch
Description: Binary data

Reply via email to