This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7551: g++ does not mind non-void functions which return no value.


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]