Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Why va_start takes 2 arguments

Reply
Thread Tools

Why va_start takes 2 arguments

 
 
Minti
Guest
Posts: n/a
 
      09-03-2004


I was just checking


http://docs.freebsd.org/info/gcc/gcc.info.Varargs.html

and

http://www-ccs.ucsd.edu/c/stdarg.html

I seemed to have never given this simple thing much thought, but I was just
curious of the reason why this might be the case so I checked up the
Rationale at

http://www.lysator.liu.se/c/rat/d8.html

And it seems to have confused me more than before. Can anyone provide any
insight into what sort of implementations might find the second argument
intresting? And what is this thing about registers and function pointers.

Thanks.





 
Reply With Quote
 
 
 
 
Ben Pfaff
Guest
Posts: n/a
 
      09-03-2004
"Minti" <(E-Mail Removed)> writes:

[about va_start]
> Can anyone provide any insight into what sort of
> implementations might find the second argument intresting? And
> what is this thing about registers and function pointers.


In many implementations, va_start(list, arg) basically does
something similar to list = &arg + 1. Without the second
argument, the implementation would need an extension that
provided the last argument, e.g. a magic identifier like
__last_arg.
--
Ben Pfaff
email: http://www.velocityreviews.com/forums/(E-Mail Removed)
web: http://benpfaff.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VA_START called inside a function with fixed number of arguments (#2) tukki C++ 0 07-30-2010 11:22 AM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
VA_START called inside a function with fixed number of arguments mahesha C++ 3 10-05-2006 10:42 PM
function call with arguments which takes no arguments Neo C Programming 10 01-20-2005 06:31 AM
va_start and template functions do not compile under gcc 2.7.2 frankg C++ 4 07-28-2003 12:12 PM



Advertisments