egcs-1.1.1 g++ bug
Tomislav Goles
tom@ait-tech.com
Fri Dec 4 11:07:00 GMT 1998
I just installed egcs-1.1.1 on my HPUX (10.01) and Linux (2.0.35).
The following 3 line test program compiles without reporting any
errors on Linux but it both produces an error message and interal
compiler error on HPUX.
struct a { void b( void ); };
inline void a::b( void ) { static const char c[] = "hello"; }
int main( void ) { a d; return( 0 ); }
HPUX:
% g++ --version
egcs-2.91.60
% g++ -c -o foo.cpp -o foo.o
foo.cpp: In method `void a::b()':
foo.cpp:2: warning: sorry: semantics of inline function static data `const char const c[6]' are wrong (you'll wind up with multiple copies)
foo.cpp:2: Internal compiler error.
foo.cpp:2: Please submit a full bug report to `egcs-bugs@cygnus.com'.
foo.cpp:2: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
Linux:
% g++ --version
% g++ -c -o foo.cpp -o foo.o
%
I think the warning message produced on HPUX is correct. If this is true
then there are two problems here: Linux version does not produce this
warning and HPUX produces internal compiler error (after correctly
producing the warning).
Tomislav Goles
More information about the Gcc-bugs
mailing list