In message <[email protected]>, Ryan
 Stone writes:

>> #define bprintf(buf, fmt, ...)                                          \
>>        do {                                                            \
>>                assert(snprintf(buf, sizeof buf, fmt, __VA_ARGS__)      \
>>                    < sizeof buf);                                      \
>>        } while (0)
>
>Anyone using this macro is in for a nasty surprise when they compile
>with -DNDEBUG.

First, I think they will figure out pretty fast that it is a bad idea.

Second, -DNDEBUG has always been and still is a mistake.

That is why we have an explicit DIAGNOSTIC for the kernel.

Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[email protected]"

Reply via email to