This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.2 more strict check for "function called through a non-compatible type"
- From: Ian Lance Taylor <iant at google dot com>
- To: Yuri Pudgorodsky <yur at ptci dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: 04 Jul 2006 10:14:50 -0700
- Subject: Re: gcc 4.2 more strict check for "function called through a non-compatible type"
- References: <44AA67AE.4070509@ptci.ru>
Yuri Pudgorodsky <yur@ptci.ru> writes:
> Compiling openssl-0.9.8b with gcc-4.2 snapshots, I found gcc 4.2
> fortifies its check for function pointer conversion and generates
> abort for PEM_read_X509_AUX() and similar wrappers.
Personally speaking, I agree with you that the compiler should issue a
warning and then go ahead and compile the call. I don't think we gain
anything useful by compiling a runtime abort in this case. The spirit
of C is to let the user shoot themselves in the foot if they really
want to.
Any contrary opinions?
Ian