va_arg()



Hello,

I have a question about va_arg() usage :
Is there any way how I can check or ensure at compile time that
va_arg() is not called when there are
no next arguments anymore.
I understood that calling va_arg() when there are no next arguments
causes an undefined behaviour.

Thanks

.



Relevant Pages

  • Re: crash the application at calling API function as GetCursorInfo...
    ... I am not usage typedefing the CURSORINFO struct only illustration. ... But whether usage alignment. ... >> calling next this function. ... >> with a function pointer declared with a different calling convention. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: question on const
    ... >> Are you trying to say that all possible undefined behaviour ... int main ... Yet very few systems will complain at run-time whether or not UB ... and none that I know of will complain at compile time. ...
    (comp.lang.c)
  • Re: Dont understand delegates
    ... It's just that the _calling_ code doesn't know until runtime. ... With that in mind, I'd say that technically speaking, all uses of delegates fall into this category. ... But the reason they are used for event handlers is that at compile time, the implementer of the event doesn't know what code will be called. ... I prefer delegates, and I feel that for single-method situations they are way more convenient than having to create a whole interface and then implement it in each class that wants to provide a method to call at specific times (whether to support events, i/o callbacks, whatever). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Bittorrent
    ... >> At the bottom of the page show the usage for calling the bittorrent program. ...
    (Fedora)
  • Re: calling for
    ... for the last decade remarked that she finds the locution "calling for" ... thunderstorms" to be a peculiar usage. ... something like "tomorrow's forecast calls for thunderstorms". ...
    (alt.usage.english)