Re: [PATCH v1 1/1] trace2: NULL is not allowed for va_list
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- Mar 18, 2019, 17:58 UTC
- Message-ID
- <CANv4PNm_9W9cqUdcx7vxOnafT_BR1grzOwsepLk+m3KRh0btoA@mail.gmail.com>
- In-Reply-To
- <20190318155459.nrog5r5y3ci3bz3x@tb-raspi4>
> And I couldn't find any hints that va_list and pointers can be mixed, > and no hints that they can't either
C99, Section 7.15, simply says that it "is an object type suitable for holding information needed by the macros va_start, va_end, and va_copy".
So clearly not guaranteed to be mixable with pointers. And not prohibited from being mixable either, for that matter. And, nit-pickingly, NULL might be a valid value representing some sequence of arguments if the two are mixable.
M.