This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19253] [3.4/4.0 regression] bad error message / ICE for invalid template parameter
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2005 16:45:12 -0000
- Subject: [Bug c++/19253] [3.4/4.0 regression] bad error message / ICE for invalid template parameter
- References: <20050104143107.19253.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-01-04 16:45 -------
The following example is even worse:
=================================
namespace N { struct X; }
template<typename> struct A
{
A<typename N::X x> a;
};
=================================
Mainline crashes without emitting an error message first.
gcc 3.4.3 and 3.4.4-pre issue the same error messages as above.
This is bogus, since N::X is not a template (neither in line 1
nor in line 5). Well, they even error out on the valid code snippet
=================================
namespace N { struct X; }
template<typename> struct A {};
template<typename> struct B
{
A<typename N::X> a;
};
=================================
Mainline accepts the code thanks to Mark's patch for PR18738.
IMHO the right thing to do is to fix the ICE on mainline and backport
the fix for PR18738 and the fix for the ICE to the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |18738
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253