This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/7551: g++ does not mind non-void functions which return no value.
- From: Tim dot Barnett at hekate dot org dot uk
- To: gcc-gnats at gcc dot gnu dot org
- Date: 9 Aug 2002 11:44:16 -0000
- Subject: c++/7551: g++ does not mind non-void functions which return no value.
- Reply-to: Tim dot Barnett at hekate dot org dot uk
>Number: 7551
>Category: c++
>Synopsis: g++ does not mind non-void functions which return no value.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Fri Aug 09 04:46:06 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Tim Barnett
>Release: 3.1.1
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
A simple function with a return type (say, int or bool)
but which fails to return a value at all, compiles fine
without even a warning. Even with -pedantic and/or -ansi.
Also saw this with version 3.0.4.
>How-To-Repeat:
g++ bug.ii
Where bug.ii is the included, preprocessed source file.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: