bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI, recent gcc vs. glibc's `#define printf(...' vs texinfo-4.0b


From: Mike Castle
Subject: Re: FYI, recent gcc vs. glibc's `#define printf(...' vs texinfo-4.0b
Date: Fri, 4 May 2001 10:41:50 -0700
User-agent: Mutt/1.3.6i

On Thu, May 03, 2001 at 09:47:31AM -0400, address@hidden wrote:
> But may I ask what purpose the printf macro serves?  I'm just curious.

Saves a function call.

printf could be implemented as:

printf(...)
{
  return fprintf(stdout, ...)
}

So why not make it a macro and save the extra function call?

Of course, the cost of a function call compared to the cost of calling
write() to actually push the data to the OS is minimal, I would think.

mrc
-- 
       Mike Castle       Life is like a clock:  You can work constantly
  address@hidden  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]