[Bug c++/51145] [C++11][DR 1131] Alias template in elaborated-type-specifier accepted

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 18 13:25:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51145

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-18 13:11:48 UTC ---
(In reply to comment #2)
> -      error ("using typedef-name %qD after %qs", decl, tag_name (tag_code));
> -      error ("%q+D has a previous declaration here", decl);
> +      if (alias_template_specialization_p (type))
> +	error ("using alias template specialization %qT after %qs",
> +	       type, tag_name (tag_code));
> +      else
> +	{
> +	  error ("using typedef-name %qD after %qs", decl, tag_name (tag_code));
> +	  error ("%q+D has a previous declaration here", decl);
> +	}

Let's share the "previous declaration" message between the two cases, and
change it to inform.



More information about the Gcc-bugs mailing list