- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it reliable to call a vararg function by prototyping it as a cdecl function without the ellipsis? It can be useful to call a C library vararg function from a language that doesn't support varargs. Often, varargs are a string-formatting convenience, and they can instead be passed a formatted string as the last non-optional argument, if it has no printf syntax.
My understanding is that the extra optional arguments will go on the stack, but is it essentially identical to a regular cdecl function if it is called wiothout any extra arguments. Is this inherent in the CDECL specification, or are there platforms where vararg calls handle arguments differently?
My understanding is that the extra optional arguments will go on the stack, but is it essentially identical to a regular cdecl function if it is called wiothout any extra arguments. Is this inherent in the CDECL specification, or are there platforms where vararg calls handle arguments differently?
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page