lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You can do it individually.
At one stage my coding style was to wrap spurious warnings like:

#pragma warning( disable : 4514 )

<code ... />

#pragma warning( enable : 4514 )

This also highlights to the programmer that One (hopefully) knows what they are doing. MS use this approach in their SDK code.
I cant remember it offhand but I know you can do the same in GCC

DB

Roberto Ierusalimschy wrote:
Roberto Ierusalimschy wrote:
(Any compiler should provide a standard (and documented) way to silence
each of its warnings.)

-- Roberto
MS VCs (all of them I think use
e.g.
#pragma warning( disable : 4514 )

#pragma warning( disable : errorlist  ... )

I am not sure about gcc.

However one of the rules of #pragma methinks is that compilers are
supposed to ignore it if they do not understand it.

What I meant was a way to silence each instance of them, individually.
Some way to say "here I know what I am doing". Things like extra
parentheses, explicit casts, casts to void, etc.

-- Roberto