[Bug c++/47705] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5006
bero at arklinux dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 11 19:05:00 GMT 2011
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;"
More information about the Gcc-bugs
mailing list