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]

Re: patch to suggest putc/fputs over printf("string") or printf("\n")


>   > It would be nice to avoid pulling in the floating point conversions when
>   > possible :-)
> Absolutely.  That's why it originally came up internally at Cygnus.  We get a
> fair number of questions/complaints in this area.  Some programmer does
> fprintf (stream "error: %s", someerror);
> 
> Then they start asking why they sucked in the fp emulation code since they
> know their code doesn't do any floating point operations.

This seems eminantly fixable.

If any printf format includes a floating point specifier, or a
non-constant format, include a reference to a symbol which will pull in
and register the floating point conversions.  Otherwise don't.

-- Jamie


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