This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 10 Jan 1999 22:28:41 -0700
- cc: Joe Buck <jbuck at Synopsys dot COM>, ghazi at caip dot rutgers dot edu, egcs-patches at cygnus dot com, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <r23e5is9xy.fsf@happy.cygnus.com>you write:
> Jeffrey A Law <law@hurl.cygnus.com> writes:
>
> > I'm not familiar enough with the issues behind gettext to know why they d
> o
> > this. But it's simply wrong for the compiler to do any tranformations if
> the
> > format string is not a compile time constant.
>
> No, the attributes introduced allow this kind of transformation.
Ok. If we have an attribute that tells us what format specifier can appear
in the string returned by gettext, then that is sufficient information to
allow us to optimize that case too -- one can view the attributes as giving
us the compile-time information we need.
> You
> admitted that you don't know the details of gettext, so why do you say
> it's wrong?
Because in the absense of additional infomation (like attribute specifiers) it
is wrong.
So, I still don't see why you object to the optimization.
jeff