public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47705] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5006
@ 2011-02-11 19:05 bero at arklinux dot org
  2011-02-11 19:29 ` [Bug c++/47705] [4.5/4.6 Regression] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bero at arklinux dot org @ 2011-02-11 19:05 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-08 22:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 19:05 [Bug c++/47705] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5006 bero at arklinux dot org
2011-02-11 19:29 ` [Bug c++/47705] [4.5/4.6 Regression] " redi at gcc dot gnu.org
2011-02-13 11:47 ` rguenth at gcc dot gnu.org
2011-02-22  9:51 ` jakub at gcc dot gnu.org
2011-03-08 16:03 ` jason at gcc dot gnu.org
2011-03-08 17:31 ` jason at gcc dot gnu.org
2011-03-08 18:52 ` [Bug c++/47705] [4.5 " jakub at gcc dot gnu.org
2011-03-08 22:03 ` jason at gcc dot gnu.org
2011-03-08 22:40 ` jason at gcc dot gnu.org
2011-03-08 22:42 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).