gcc 4.2 more strict check for "function called through a non-compatible type"
Andrew Pinski
pinskia@physics.uc.edu
Wed Jul 5 16:11:00 GMT 2006
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.
Is it really working after all is the real question and I say no it
can never
work correctly on any target. I showed a better example where
passing a fp
value and the function expects it in the general purpose register.
Which
happens on most targets except for x86 (32bit only in fact).
-- Pinski
More information about the Gcc
mailing list