Re: Passing too many parameters to a function?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 18 Sep 2006, at 21:06, Camillo Lugaresi wrote: On 20/ago/06, at 12:17, Uli Kusterer wrote: Hi, int main() or int main( int argc, const char* argv* ) -- Graham J Lee http://www.thaesofereode.info/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... you know how main() can be declared with varying parameter counts, like and even more. Does this work for any function? I just read this thread, and although it's old, it seems that it did not reach a conclusion, so forgive me for resurrecting it. :) If you look at the PPC and IA32 ABIs, it seems that what you want to do is safe. Although that doesn't conform with any published version of the C standard[*], so if Apple ever decided that their C really *is* C then you'd be up the proverbial tributary... [*]It's only main() which is /allowed/ more than one prototype, and then there are only two. I think the rare main(argc,argv,envp) is only ever an implementation-specific monstrosity. This email sent to site_archiver@lists.apple.com
participants (1)
-
Graham J Lee