Error: ANSI C++ forbids declaration `samplefunc' with no type

Ralf Vandenhouten vandenhouten@datan.de
Wed Dec 15 10:07:00 GMT 1999


I am using egcs 2.95.1 on a Sun Sparc (Solaris 2.6). When compiling a
C++ program using X11 libraries (some functions of which are declared
without a return type, unfortunately), I get the error message

ANSI C++ forbids declaration `samplefunc' with no type

and the compilation stops. Is there a way to tell gcc to ignore this
"standard violation"? Or at least turn the error into a warning? If not,
maybe during the configure/build process of the egcs compiler?

I urgently need this, because it would be a hard job to make all X11
headers of the system ANSI C++ compatible manually...

Any pointers are very welcome.

Thanks in advance,
Ralf Vandenhouten


More information about the Gcc-help mailing list