c++/7551: g++ does not mind non-void functions which return no value.
Tim.Barnett@hekate.org.uk
Tim.Barnett@hekate.org.uk
Fri Aug 9 04:46:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list