This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47705] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5006
- From: "bero at arklinux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Feb 2011 19:02:31 +0000
- Subject: [Bug c++/47705] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5006
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47705
Summary: internal compiler error: in convert_nontype_argument,
at cp/pt.c:5006
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bero@arklinux.org
Running the following (invalid) code:
template<char const * const x> class Something {
};
extern char const xyz;
class SomethingElse:public Something<xyz> {
};
through gcc 4.5.2 results in:
test.cpp:6:41: internal compiler error: in convert_nontype_argument, at
cp/pt.c:5006
The problem with the code is that xyz should be xyz[] -- I'd expect the error
message to be
test.cpp:6:41: error: âxyzâ is not a valid template argument because âxyzâ is a
variable, not the address of a variable
Which is what you get if you remove the "const" in "extern char const xyz;"