public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6371: bug with template functions
@ 2002-04-19 0:46 lodewijk_smit
0 siblings, 0 replies; only message in thread
From: lodewijk_smit @ 2002-04-19 0:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 6371
>Category: c++
>Synopsis: g++ crashes with template function with wrong return type
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Fri Apr 19 00:46:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Lodewijk Smit
>Release: 3.0.3
>Organization:
University of Twente
>Environment:
System: Linux loki 2.4.9-31smp #1 SMP Tue Feb 26 06:55:00 EST 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/home/aid/smitl/linux
>Description:
The compiler crashes instead of reporting an error in the code for a template
function that returns a wrong type. See code below.
>How-To-Repeat:
Compile the following piece of code:
--------------start here-------------
template<class T>
T MaxS(T X, T Y)
{
}
T MaxS(int X ,int Y) {
}
main() {};
--------------end here---------------
>Fix:
Work around: Write correct code :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-19 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-19 0:46 c++/6371: bug with template functions lodewijk_smit
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).