This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20624] wrong "control reaches end of non-void function" warning
- From: "oliverst at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2005 17:32:16 -0000
- Subject: [Bug middle-end/20624] wrong "control reaches end of non-void function" warning
- References: <20050324162738.20624.oliverst@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From oliverst at online dot de 2005-03-24 17:32 -------
I know, that there is a standard, but it's only a standard and any
implementation can have its own bugs. And having just one STL you should run
into the same bugs and not having it working fine on one operating system and
not running on another one and to find out, that one of them has an obscure and
very deep bug in it, after days of debugging. That's why we switched.
And even STLport wasn't(isn't) really standard compliant yet, because some
functions returned somethign they shouldn't return.
MSVC, GCC, BCB, ICC are also all behaving different although they have a
standard to apply to...and I also still see a lot of open GCC bug reports about
accepting invalid or rejecting valid code ;-)
I am using the following options:
-Wextra -Wall -Wshadow -Wwrite-strings -Wdisabled-optimization -Wno-long-long
-Wno-unknown-pragmas -Wsign-compare -Wpointer-arith -Winline -Wno-reorder
-Wno-missing-braces -save-temps -fexceptions -fmessage-length=0
But just using -Wall already triggers the warning for me.
You also have to include the "STLport/stlport" folder as the first one, so it
lies on top of the standard includes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20624