Re: Variadic macros and commas

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

 



David Sveningsson <ext@xxxxxxxxxxx> writes:

> It keeps adding pointers until NULL is reached, thus the argument list
> must be ended with NULL. If 'first' is NULL an empty array is returned.
> However too often NULL is forgotten causing nasty bugs.

You may find the sentinel function attribute to be useful here.  It is
a gcc extension which adds a warnings if the function is called
without a trailing NULL.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux