Q: middle-end problem when variadic builtins promote float to double
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Sat Jul 7 16:10:00 GMT 2007
On Fri, 6 Jul 2007, Joseph S. Myers wrote:
> On Fri, 6 Jul 2007, Kaveh R. GHAZI wrote:
>
> > So how do we detect or work around this promotion issue and discriminate
> > between the case where a float is promoted because of the variadic
> > prototype vs a user supplied cast or other user code?
>
> I think we may need to tag these builtins in some way to indicate to the
> front ends that arguments shouldn't be promoted. (With some other
> builtins, such as __builtin_printf, the normal C promotion rules should be
> applied.)
Ok, how about e.g. __attribute__ ((__type_generic__)), which would only be
allowed on variadic functions?
In addition to the isnormal (etc) builtins, we probably want to mark
"isless" and the other comparison builtins as well.
Q: Do I have to worry about languages other than the C-family?
Q: Do you recall where this promotion takes place? (You wrote the
C-frontend, right? :-) )
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu
More information about the Gcc
mailing list