This is the mail archive of the gcc-patches@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")



  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


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