Hi Bart (are you around?)
Thanks this worked fine (it took some time to test)
Alain PS: you are getting good at reading minds ;-)
Bart Oldeman escreveu:
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, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel