This is the mail archive of the
mailing list for the GCC project.
Re: Patch to add __builtin_printf("string\n") -> puts("string")
- To: tv at pobox dot com
- Subject: Re: Patch to add __builtin_printf("string\n") -> puts("string")
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 22 Sep 2000 12:44:14 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
> From: Todd Vierling <firstname.lastname@example.org>
> On Fri, 22 Sep 2000, Kaveh R. Ghazi wrote:
> : I suppose you could argue that the second string would waste space
> It can--meaning that, regardless of this debate, this optimization must have
> an option to turn it off (or on, if it defaults to off).
You can use -fno-builtin if you want to turn it off with a sledge hammer.
> Additionally, a
> -Os compile must check to see whether the unchopped string is used in the
> same compilation unit, and not do the transform if so.
Scanning the whole compilation unit is beyond the scope of this work.
Again, in most cases it tends to shrink the size of the unit.
If we find otherwise, I'm willing to have -Os bypass this opt, but
my experience shows the reverse is true. It is a space win.
Kaveh R. Ghazi Engagement Manager / Project Services
email@example.com Qwest Internet Solutions