Strange Warning Message

Jean Paul POIRET JeanPaul.Poiret@fth.net
Wed Sep 16 03:38:00 GMT 1998


Dear Sir,

Trying to compile this piece of code with egcs-1.1b on a Sun Sparc
Ultra-2, I've got the message :

% g++ -c -O -Wall es.cc
es.cc: In function `int grCreateList()':
es.cc:15: warning: control reaches end of non-void function
`grCreateList()'

A work-around is to deactivate the optimizer.

-------------------- begin of source code ----------------
#include <string>
#include <vector.h>

int grCreateList()
{
        vector < string > vtsgErrPar;

        {
                        return 0 ;
        }
}
-------------------- end of source code ----------------

I would be glad if you had some information about this warning.

Best regards,

Jean-Paul

---------

Jean-Paul Poiret               jpp@fth.net



More information about the Gcc-bugs mailing list