On 2012-11-19 18:48, Vadim Zeitlin wrote:
[...]
> We use __INTELC__ for this. But I still don't like it, it would mean
> littering the code with icc-specific macros which are useless for other
> compilers. I prefer just to disable the warning for ICC, if it has pragmas
> to do it just around wx/textctrl.h contents we could do this, otherwise it
> could be disabled globally.
Yes, I'm against to temporary solutions and these ugly non-readable code
as well...
I can make a patch like:
--- snip ---
#if defined(__INTELC__)
# pragma warning( push )
# pragma warning( disable : 809 )
#endif
class {
...
};
#if defined(__INTELC__)
# pragma warning( pop )
#endif
--- snip ---
but I'm not sure whether ICC under non-MSVC is able to understand
MS-specific:
# pragma warning( push )
and it's "pop" counter-part (I did some google but w/o any relevant
results; if you are more clever at choosing right keywords, get back to
me...). If not (push/pop), we can omit these pragmas, and disable 809's
fully in "prologue" code (i.e. defs.h or and-alike). This would mean
user will not get this warning at all, if we not re-enable it in some
"epilogue" code. Other solution would be only disable them in particular
.cpp files, which I feel would be the best solution, though, some
virtual dtors are inlined/empty inlined. In this case, I could move them
into .cpp's in my patch (but as they are empty and virtual, the compiler
will supply generated virtual dtor by itself).
What you feel is the best for me to do a right patch?
Any thoughts are welcome.