This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Q: middle-end problem when variadic builtins promote float to double


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]