tech-kern archive

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

Re: KASSERTMSG fix



>> You can't actually _write_ something like
>> void foo(const char *, ..., int, const char *, const char *, ...);
> But you can do:
> void foo(const char *, va_list, const char *, ...)
> if you need to add some extra args.

Yeah, but then you have to pass a va_list, not separate args.  Of
course, for some uses, that's entirely tolerable.

> What would be useful is a format effector that processes a format
> string and a va_list (recursive call inside vsnprintf).

> But adding non-standard effectors is not really a good idea.

I once added such a thing (I think I used %@).  It was easy, but I
never used it very much and never rolled it forward (it was 1.4T I
added it to).  Never even got around to adding it to -Wformat.

As for using nonstandard formats, don't we already do that with %b?

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index