public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: hezamu@tuug.org To: gcc-gnats@gcc.gnu.org Subject: middle-end/6033: Naming and returning a value from a void function causes an internal compiler error (g++) Date: Thu, 21 Mar 2002 23:46:00 -0000 [thread overview] Message-ID: <20020322074246.26435.qmail@sources.redhat.com> (raw) >Number: 6033 >Category: middle-end >Synopsis: Naming and returning a value from a void function causes an internal compiler error (g++) >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Mar 21 23:46:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Henri Muurimaa >Release: g++ 2.95.2 >Organization: >Environment: Debian Linux 2.2r5 >Description: If I have a function returning void but name its return value, and have it return it, ie: void foo() return retval { return retval } I get a internal compiler error: foo.c: In function `void foo()': foo.c:3: Internal compiler error in `expand_expr', at expr.c:5771 Please submit a full bug report. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. This is probably a trivial bug (I haven't looked at the source), but the compiler asked me to report the bug, so here you are. >How-To-Repeat: Type the trivial example function shown in the bug description to a file, and try to compile it with g++ >Fix: Naming a void function's return value is obviously a stupid mistake from the coder's part, so to avoid the problem, don't do stupid mistakes :) >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-03-22 7:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-21 23:46 hezamu [this message] 2002-03-22 19:51 rodrigc
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=20020322074246.26435.qmail@sources.redhat.com \ --to=hezamu@tuug.org \ --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).