Boost logo

Boost :

Subject: Re: [boost] [Wiki] Changes in information about gcc warnings.
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-01-18 16:10:50


Patrick Horgan wrote:
> On 01/18/2011 06:08 AM, Stewart, Robert wrote:
>
> > -pedantic is a pain if you use, for example, #ident. So
> > far as I know, there's no way to reduce the resulting noise.
>
> That's true. Unfortunately there's no individual -W option for
> complaining about #ident, so you can't turn off the warning.

I wouldn't mind so much if the checks in -pedantic could be selected individually.

> If you're using #ident, which is a gcc extension, then you're
> clearly making a choice to use that compiler and that
> extension.

Not quite. Other compilers support #ident, though it isn't standard. MSVC used to support an option with similar functionality, but no more. Now we just use:

   #ifndef _MSC_VER
   # ident "$Id:$"
   #endif

> In that case I wouldn't use -pedantic. Even something like
> using -std=gnu++0x won't get rid of it. It's a perfectly
> valid choice, but conflicts with a goal to be portable across
> many compilers.

That goal can be supported using conditional compilation, too. However, my point was that -pedantic may be something one uses occasionally to keep unwanted things at bay but may be too troublesome to be used all of the time. YMMV

> Do you know what the default is for the version of gcc you're
> using (currently c++98)?

We're using the default, sadly, but that will change in the not too distant future.

> As an example, there's a lot of usage of long long in boost,
> which is not in c++98 and will give warnings in the absence of
> -std=c++0x.

We use -Wno-long-long to enable the use of long long.

As Paul noted, such details should be included in the Wiki so they won't be a surprise.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk