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: Promoting floats to doubles?


On Tue, 4 May 2004, Kean Johnston wrote:

> and in c-typeck.c:convert_arguments(), where I extended the check
> after the call to targetm.calls.promoto_prototypes to check for
> a TREE_TYPE(type) == REAL_TYPE.

It's a defect in the back-end interface that the front end has a call to
such a target hook at all.  This should actually be handled somewhere in
the middle-end generating code for function calls, which should take calls
with their original types and handle promotion as required by the ABI;  
such promotion has no semantic effect so each front end shouldn't need to
deal with it.

If this ABI requirement needs a new target hook, it would be better to
have one that only needs to be called once in the compiler rather than in
every front end.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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