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
On Tue, 11 Mar 2003, Falk Hueffner wrote:
> Petko Manolov <petkan at users dot sourceforge dot net> writes:
>
> > 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.)
I think the optimization of memory and string routines should be
separated from the libcalls since they are different entities anyway.
While optimizing memcpy and friends for a given architecture is usually
the right thing to do i don't feel this is the case with printf, scanf,
etc. When i am invoking a compiler i don't expect it to be _that_ smart
and i would prefer to be able to explicitly specify when i want this sort
of optimization instead of having it on by default.
I doesn't seem proper to me to see perfectly sane pieces of C code
failing to link because of gcc upgrade.
cheers,
Petko