This is the mail archive of the gcc-bugs@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]

[Bug c++/19253] [3.4/4.0 regression] bad error message / ICE for invalid template parameter


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


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