Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Re: Compiler Recommendations



 
Jerry Feldman <[hidden email]> writes: 

> Additionally, some languages pass their 
> arguments in different orders. C passes its arguments onto the stack 

I don't believe that the C standard specifies that an implementation 
must use a stack to somehow transport arguments, but if you can find 
the place in the standard where it specifies a stack must be used, I 
would learn something new. 

> last to first such that the called function picks up the first argument 
> from the top of the stack(below the return address of course). The 
> reason for this is that C and C++ allow for a variable number of 
> arguments. (Note that passing via registers simulates a stack). Most 
> other languages pass arguments first to last. 

I don't believe that the C standard specifies that an implementation 
must pass arguments "last to first", but if you can find the place in 
the standard where it specifies this order, I would learn something 
new. 

I am certainly familiar with particular implementations and ABIs that 
specify these things,  Perhaps this is what you are alluding to? 

(there now, I have made my point) 

Kind regards, 

--kevin 
-- 
GnuPG ID: B280F24E              God, I loved that Pontiac. 
alumni.unh.edu!kdc                   -- Tom Waits 

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

_______________________________________________ 
Discuss mailing list 
[hidden email] 
http://lists.blu.org/mailman/listinfo/discuss
 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org