|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-06-27 10:51:34
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Oliver Kullmann
| Sent: 27 June 2006 13:29
| To: boost_at_[hidden]
| Subject: Re: [boost] Supressing warnings
|
| In my opinion, a major problem with paying
| attention to warnings and changing the code in order
| to prevent warnings is, that in this way the code
| is not only written for a *special compiler*, but
| even **for a special compiler version**.
| I don't think that this is good practice.
|
| More and more people realise, that the code "should
| speak the truth", but code can be obfuscated by trying
| to prevent compiler warnings (for some special compiler,
| in some special version).
What about the MSVC warning 4127?
silenced with
# pragma warning(disable: 4127) // conditional expression is constant.
No amount of recoding can help with this can this - a constant conditional
expression is exactly what one was trying to achieve!
What are you suggesting for this?
Doing nothing is not an option, if you accept my premise that a -pedantic or
MSVC level 4 compile without warnings is what we want.
What mechanism for supressing it is best?
| Having said this, in my experience gcc, version 4.1 or later,
| with "-ansi -pedantic -Wall" works quite well.
Does it produce a "conditional expression is constant" warning?
(Or similar generally unhelpful messages).
How can you stop it?
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk