egcs-1.1 bug on template generation
Jean Paul POIRET
JeanPaul.Poiret@fth.net
Tue Sep 15 02:32:00 GMT 1998
Hello,
on a Sun Sparc Ultra-2, with egcs-1.1b I tried to compile this small C++
function :
-------------------- begin of source code ----------------
#include <string>
#include <vector.h>
int grCreateList()
{
vector < string > vtsgErrPar;
{
return 0 ;
}
}
-------------------- end of source code ----------------
% g++ -c -O -Wall es.cc
es.cc: In function `int grCreateList()':
es.cc:15: warning: control reaches end of non-void function
`grCreateList()'
%
Yet it's not possible to leave the body of this function grCreateList()
without executing 'return 0'.
It looks like the template were generating a goto the end of the
function, since the warning disappears when removing the line "vector <
string > vtsgErrPar;".
Thank's a lot...
Jean-Paul POIRET
http://www.fth.net/staff/J_Paul_Poiret.html
More information about the Gcc-bugs
mailing list