r270494 - in /trunk/gcc: cp/ChangeLog cp/typeck...

jason@gcc.gnu.org jason@gcc.gnu.org
Mon Apr 22 19:16:00 GMT 2019


Author: jason
Date: Mon Apr 22 19:16:46 2019
New Revision: 270494

URL: https://gcc.gnu.org/viewcvs?rev=270494&root=gcc&view=rev
Log:
	PR c++/87366 - wrong error with alias template.

With this testcase the code in template_args_equal to treat aliases as
distinct wasn't sufficient, because it only looked at the top level, whereas
here we have a reference to the alias.  So let's also handle treating them
as distinct in structural_comptypes.  For GCC 10 I have a more comprehensive
patch, but for GCC 9 let's go with this smaller change.

	* typeck.c (structural_comptypes): When comparing_specializations,
	aliases are unequal.
	(comptypes): When comparing_specializations, do structural
	comparison.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-66.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c



More information about the Gcc-cvs mailing list