]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/87366 - wrong error with alias template.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Apr 2019 19:16:46 +0000 (19:16 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Apr 2019 19:16:46 +0000 (19:16 +0000)
commit800688513b6090aa93a95760b1bd066c2d5b9f20
tree5463b687bd25e7cba53974befa499a9967e41cf6
parent56dc756d6edecfe929326e9120e2a00c877414cf
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270494 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/g++.dg/cpp0x/alias-decl-66.C [new file with mode: 0644]