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] for c++/14258 (aka using typename)


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  <fabien@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  <fabien@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


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