[patch] WARNING macro for msvc compilers
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Thu Dec 6 19:35:29 CET 2007
Jarosław Staniek schrieb:
>
> Hello,
> For review:
> As msvc provides no #warning support, there can be something like
> #pragma used with special parameters. In Kexi development I've prepared
> and tested WARNING macro and now propose it for incusion into a toplevel
> win32 include.
>
> 1. Typical usage of #warning in a portable piece of code is:
>
> #ifdef __GNUC__
> # warning TODO implement this
> #endif
>
> 2. However if someone develops with msvc and wants the warning(s) to
> appear in msvc buildsystem:
>
> #ifdef __GNUC__
> # warning TODO implement this
> #else
> # pragma WARNING( TODO implement this )
> #endif
>
> The WARNING macro displays function name as well.
>
> Notes:
> To use the code we could typically include <kde_file.h>.
>
> I've even got a script which converts existing non-msvc code to 2nd
> form, what's useful for
>
I'm fine with this patch.
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/kde-windows/attachments/20071206/6ddaa309/attachment.pgp
More information about the Kde-windows
mailing list