c++/1020: g++ Crash on default template parameters

marcus.geiger@bigfoot.com marcus.geiger@bigfoot.com
Sat Dec 9 06:46:00 GMT 2000


>Number:         1020
>Category:       c++
>Synopsis:       g++ Crash on default template parameters
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 09 06:46:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     marcus.geiger@bigfoot.com
>Release:        unknown-1.0Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specsgcc version 2.95.2 20000220 (Debian GNU/Linux)
>Organization:
>Environment:
Linux blackwolf 2.4.0-test10 #1 Sun Nov 19 15:53:52 CET 2000 i686 unknown
>Description:
g++ crashes if a malformed template class with default template parameters is instantiated. If one creates a class with a default template parameter and declares another non-default template parameter after the defaults.

g++ gives this error message:
main.cc:7: Internal compiler error.
main.cc:7: Please submit a full bug report.
main.cc:7: See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
>How-To-Repeat:
Simply compile with:
g++ -Wall -g -c main.cc

no include files are required!
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: unknown; name="main.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="main.cc"

CnRlbXBsYXRlPGNsYXNzIEEsIGNsYXNzIEI9aW50LCBjbGFzcyBDPgpjbGFzcyBGb28ge307Cgpp
bnQgbWFpbigpCnsKCUZvbzxsb25nPiBmb287CglyZXR1cm4gMDsKfQo=


More information about the Gcc-bugs mailing list