This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: printf optimiziation in gcc-3.2.x
Petko Manolov <petkan at users dot sourceforge dot net> writes:
> > The ISO C standard defines printf and allows this behaviour for all
> > functions that are part of the standard.
>
> Oh, i see now.
>
> > Free-standing means basically you have no C Library and therefore gcc
> > will not do such optimizations,
>
> That is good enough for me. I'm using no C library for this
> particular project so the option should do.
Note that -ffreestanding completely disables these optimizations,
though, e. g. memcpy(a, b, 4) isn't inlined anymore. (It would be nice
to have a switch that only disables emitting new libcalls, but I don't
think there is one.)
--
Falk