tech-userlevel archive

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

Re: must use gcc builtin?



On Wed, Feb 22, 2012 at 12:09:25AM -0500, James K. Lowden wrote:
 > > > I can't #undef __GNUC__.  Do we really want to require the use of
 > > > builtins?  I'd like a knob to compile idiomatic C, especially
 > > > *good* idiomatic C.   
 > > 
 > > Yes, we really want to require the builtins for stdarg.h. Depending on
 > > the architecture, it is not even possible to write pure C code to do
 > > stdarg.h handling.
 > 
 > But for most architectures it *is* possible, and to *require* builtins
 > is to prevent reasonable code from compiling.  

You mean "some" architectures. Exceptions include minor platforms like
amd64.

 > I would be interested to know more about such an architecture, though.
 > It's hard for me to see what stdarg does that printf doesn't.  

Argument passing in registers.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index