On Thu, 6 Jan 2005, Alain wrote:
Peter Fedorow escreveu:
OmmitIfOptimizeSize break ();
Has anyone managed to make this construct qork with OpenWatcom?
We (me and Andreas) have run across this issue for debug macros and the
/##/ construct aparently does not work. We would appreciate any hint to
an alternate construct ;-)
I cannot read your mind to see what you want exactly, but of the
following the first construct works with any C89 compiler; the second,
which saves a pair of brackets is C99-style (works with OW and GCC, not
with old Borland compilers).
#ifdef DEBUG
#define DebugPrintf(x) printf x
#else
#define DebugPrintf(x)
#endif
DebugPrintf((hello));
#ifdef DEBUG
#define DebugPrintf2(...) printf(__VA_ARGS__)
#else
#define DebugPrintf2(...)
#endif
DebugPrintf2(hello);
Bart
---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel