Probable bugs in egcs-19981220 and autoconf 2.12
Roberto Bagnara
bagnara@di.unipi.it
Tue Dec 22 02:56:00 GMT 1998
Hi there,
I discovered the following while using autoconf 2.12
together with egcs-19981220/g++. Autoconf uses the following
program to check whether the C++ compiler works:
#line 894 "configure"
#include "confdefs.h"
main(){return(0);}
If the -Wall option is used, then egcs-19981220 rejects it with
ANSI C++ forbids declaration `main' with no type
Instead, without options (i.e., without -Wall) it accepts
the program happily. Note that egcs-1.1.1 does not have
this problem.
So maybe we have two bugs here:
1) in egcs-19981220 the successful compilation of a program
should not depend on -Wall being given, unless one requests
also the turning of warnings into errors (which is not the
case here);
2) in autoconf 2.12, I think an "int" should precede "main".
I can see only benefits from doing that, and this independently
from the C++ compiler in question.
Keep up the great work,
and best wishes to you all.
Roberto
--
Roberto Bagnara
Department of Mathematics, University of Parma, Italy
http://www.di.unipi.it/~bagnara/bagnara.html
mailto:bagnara@di.unipi.it
More information about the Gcc-bugs
mailing list