Sebastien Roy wrote:
> On Sat, 2008-08-09 at 11:17 -0500, Steven Stallion wrote:
>> Does Studio 11/uts support any macros which allow varargs to be passed
>> to a macro (__VA_ARGS__ comes to mind)?
>
> Yes; look for existing uses of __VA_ARGS__ in the ON source.
> -Seb
Consider the following:
static void ne_cmn_err(dev_info_t *, int, const char *, ...);
#define ne_error(dip, format, ...) \
ne_cmn_err((dip), CE_WARN, (format), __VA_ARGS__)
If issued without varargs, the preprocessor incorrectly expands the
ne_error macro as:
ne_cmn_err(dip, level, format, ); /* note extraneous comma */
Odd... I seem to recall this working just fine on studio 12 - is this a
limitation of 11 or am I missing something?
Steve
--
Yet magic and hierarchy
arise from the same source,
and this source has a null pointer.
Reference the NULL within NULL,
it is the gateway to all wizardry.
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss