Erronous warning in g++ compile

Preston A. Elder prez@antisocial.com
Thu Apr 12 08:38:00 GMT 2001


Please try compiling this file with:

g++ -Wall -O -c compiler_error.cpp

For some reason, it tells me that I reach the end of a non-void function
without returning a value, when I obviously do.  This does NOT occur if
I turn off optimization, or use -fno-default-inline.
This works with any class I've tested inside the vector.  I've commented
the file well to highlight the error.

The GCC version I use is 2.95.2 19991024
The platform is Linux 2.4.x (i486-suse-linux).

Just thought you would like to know this warning is triggering erronously.

Thanks,

-- 
_O_ PreZ :)                           Finger prez@srealm.net.au _O_
 |  prez@goth.net                      for full PGP Public Key   |

PGP FingerPrint: B3 0C F3 32 DE 5A 7D 90  26 F6 FA 38 CC 0A 2D D8
Goth Code '98:   tSKeba5qaSabsaaaGbaa75KAASWGuajmsvbieqcL4BaaLb3F4
                 nId5mefqmDjmmgm#haxthgzpj4GiysNkycSRGHabiabOkauNSW
Magick Code .92: MWI S W++ N+ PCE/NA++ D A a+ C G QO+ 666 Y



More information about the Gcc-bugs mailing list