Bug 21290 - Unexpected warning on legal code
Summary: Unexpected warning on legal code
Status: RESOLVED DUPLICATE of bug 19699
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 21:12 UTC by Magnus Fromreide
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Example program demonstrating the problem (125 bytes, text/plain)
2005-04-29 21:15 UTC, Magnus Fromreide
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Fromreide 2005-04-29 21:12:45 UTC
When compiling I get the annoying warning below.
I did not get it with g++-3.4. g++-4.0 do produce it.

$ g++ --version
g++ (GCC) 4.1.0 20050429 (experimental)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ -Wall -O1 -c foo.C -o oasAux.o
foo.C: In function 'void f()':
foo.C:15: warning: control may reach end of non-void function 'void* f2(unsigned
int)' being inlined
Comment 1 Magnus Fromreide 2005-04-29 21:15:15 UTC
Created attachment 8767 [details]
Example program demonstrating the problem

Compile with g++ -Wall -O1 -c foo.C to see the error
Comment 2 Andrew Pinski 2005-04-29 21:52:15 UTC
Even the code given in the bug has no dead code the bug is in the same in that GCC creates dead code.

*** This bug has been marked as a duplicate of 19699 ***