c++/2488: No warning if return statement missing

rovf@earthling.net rovf@earthling.net
Thu Apr 5 00:56:00 GMT 2001


>Number:         2488
>Category:       c++
>Synopsis:       No warning if return statement missing
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 05 00:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ronald Fischer
>Release:        2.95.2
>Organization:
>Environment:
Solaris
>Description:
The following code is accepted without warning by the compiler:

void* f()
{
    // no return value
    ;
}

There should be at least a warning, saying that f might not return
a value.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list