public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: johannes.gajdosik@artibrain.at To: gcc-gnats@gcc.gnu.org Cc: ikock@artibrain.at Subject: c++/10641: -Wreturn-type does not work reliably Date: Tue, 06 May 2003 11:26:00 -0000 [thread overview] Message-ID: <20030506112032.32714.qmail@sources.redhat.com> (raw) >Number: 10641 >Category: c++ >Synopsis: -Wreturn-type does not work reliably >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Tue May 06 11:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Isabel Kock, Johannes Gajdosik >Release: gcc 2.95.3 >Organization: >Environment: hpux and linux, gcc 2.95.3 > g++ -v Reading specs from /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/specs gcc version 2.95.3 20010315 (release) g++ -v Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs gcc version 2.95.3 20010315 (SuSE) >Description: Even with -Wreturn-type the compiler does not warn when no return value is supplied, see the following example (only 3 lines of code): ---- test.C begin ---- #include <string> int f(string) {} int g(const string &) {} ---- test.C end --- > g++ -c -Wreturn-type test.C test.C: In function `int g(const string &)': test.C:3: warning: control reaches end of non-void function `g(const string &)' The compiler warns about function g, but there is no warning about function f. >How-To-Repeat: See Description >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-05-06 11:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-06 11:26 johannes.gajdosik [this message] 2003-05-06 14:16 bangerth
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=20030506112032.32714.qmail@sources.redhat.com \ --to=johannes.gajdosik@artibrain.at \ --cc=gcc-gnats@gcc.gnu.org \ --cc=ikock@artibrain.at \ /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).