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: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2005 19:48:22 -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 ghazi at gcc dot gnu dot org 2005-06-09 19:48 -------
(In reply to comment #19)
> Subject: Re: GCC should combine adjacent stdio calls
> On Thu, Jun 09, 2005 at 07:29:42PM -0000, joseph at codesourcery dot com
wrote:
> > that function on the particular implementation
> > having a macro expansion without a function call.
> >
> Sorry, you lost me here.
I think he means if you call e.g. putc() in between two printf calls, putc may
be a macro which does something like this:
(--(p)->_cnt < 0 ? __flsbuf((x), (p)) : (int)(*(p)->_ptr++ = (unsigned char)
(x)))
But in this case, I believe this expansion will not allow printfs to move
across it due to the side effects of __flsbuf().
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21982