public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: lodewijk_smit@yahoo.com To: gcc-gnats@gcc.gnu.org Subject: c++/6371: bug with template functions Date: Fri, 19 Apr 2002 00:46:00 -0000 [thread overview] Message-ID: <200204190741.g3J7fe109546@loki.cs.utwente.nl> (raw) >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:
reply other threads:[~2002-04-19 7:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=200204190741.g3J7fe109546@loki.cs.utwente.nl \ --to=lodewijk_smit@yahoo.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).