This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21982] GCC should combine adjacent stdio calls
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2005 17:11:12 -0000
- Subject: [Bug tree-optimization/21982] GCC should combine adjacent stdio calls
- References: <20050609125653.21982.ghazi@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joseph at codesourcery dot com 2005-06-09 17:11 -------
Subject: Re: GCC should combine adjacent stdio
calls
On Thu, 9 Jun 2005, ghazi at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From ghazi at gcc dot gnu dot org 2005-06-09 16:55 -------
> (In reply to comment #3)
> > Subject: Re: GCC should combine adjacent stdio
> > calls
> > Another problem case is if the first format has excess arguments (which is
> > permitted by ISO C) - those arguments must be evaluated but not included
> > in the concatenated argument list.
>
> While it may be legal, our -Wformat option warns about excess arguments and I
> would suggest we don't attempt any optimization unless we pass -Wformat
> cleanly. So I think this one is surmountable.
We linked -Wformat into optimization before, then removed the link.
Although we could resurrect the status_warning function which could set a
status variable if it would warn rather than emitting the warning (and
again save and restore all the variable controlling format warnings), it's
not clear this is very desirable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21982