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: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Andrew Pinski'" <pinskia at physics dot uc dot edu>, "'Ian Lance Taylor'" <iant at google dot com>
- Cc: "'Andrew Haley'" <aph at redhat dot com>, "'Yuri Pudgorodsky'" <yur at ptci dot ru>, <gcc at gcc dot gnu dot org>
- Date: Wed, 5 Jul 2006 17:23:08 +0100
- Subject: RE: gcc 4.2 more strict check for "function called through a non-compatible type"
On 05 July 2006 17:12, Andrew Pinski wrote:
> On Jul 5, 2006, at 8:38 AM, Ian Lance Taylor wrote:
>
>> To me this is related to the point I raised at the steering committee
>> panel discussion (I know you weren't there): I think we are too casual
>> about breaking existing working code.
>
> What happens when a target comes along and passes different pointers
> types
> differently. Like say a floating point pointer in the FP register
> and an
> pointer to an integer in the general purpose register, wouldn't that
> also
> break the code in question? Yes this is in theory but still saying
> we are
> breaking existing working code is bogus in this case. The above
> reason is
> one of the reasons why this code is undefined because it does not
> make sense.
So what? There are plenty of cases where casting the function pointer does
*not* affect the calling conventions required. Your argument attempts to
conflate the two cases. There is no need to break the working cases just
because there are some other cases that don't work.
cheers,
DaveK
--
Can't think of a witty .sigline today....