Re: [C--] Segmentation fault (cannot take the address of a formal parameter)

Norman Ramsey <[email protected]> Mon, 30 Mar 2009 16:52:29 -0400
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
 > > The formal parameters of a C-- procedure are always passed in 
 > > registers.  
 > 
 > Always?  Is there a limit on the mumber of parameters?

Not always, and there is no limit :-)

 > Which brings up an interesting question -- how does the C front end 
 > translate varargs into C--?

It doesn't.  C-- can call a varargs C function but not implement one.
(Varargs as implemented in C is fundamentally antithetical to tail
calls: with varargs, only the caller knows how many arguments are
passed and when to deallocate them; with tail calls, the callee must
be able to deallocate the arguments.)


Norman
_______________________________________________
Cminusminus mailing list
[email protected]
https://www.eecs.harvard.edu/mailman/listinfo/cminusminus