Subject: Re: [boost] [1.61.0] building with Clang and c++11
From: Richard Hadsell (hadsell_at_[hidden])
Date: 2016-07-01 11:10:44
On 07/01/2016 09:36 AM, Chris Glover wrote:
> On Fri, 1 Jul 2016 at 04:56 Vladimir Prus <vladimir.prus_at_[hidden]> wrote:
>> for context, I don't think Boost C++ Libraries can be expected to build
>> without warnings on any compiler these days. There are just too many
>> versions of compilers producing warnings in too many ingenious ways.
>> The warnings above mention the command-line options that will silence
>> the warnings. E.g. if you pass -Wno-keyword-macro, the last warning
>> should go away. Likewise for other warnings. You might consider
>> reporting these warnings to libraries developers.
>> Seems like clang is unnecessary pedantic here. Though, I don't know why
>> container includes .c files - might be worth raising an issue too.
>> So, the bottom line is that you either have to live with the warnings,
>> or disable them with '-Wno-*' options.
> For building boost itself, I suggest just living with and ignoring the
> For consuming boost, I find including boost via -isystem, instead of -I,
> useful because I generally don't care about warnings from boost, but might
> not want to silence them entirely, or live with them, in my project.
I understand, and I have added warning suppressions for those that seem harmless. I may just use -isystem for using the libraries in our code.
I was mostly concerned by the warnings, when not using -std=c++11: 'long long' and 'in-class initialization of non-static data member'. I can't tell whether Clang supports them as extensions or whether it ignores them.
But when I use -std=c++11 I get an error on a C file, which I think means the library does not build correctly. I'll report that separately, as Vladimir suggests.
-- Dick Hadsell 203-992-6320 Fax: 203-992-6001 Reply-to: hadsell_at_[hidden] Blue Sky Studioshttp://www.blueskystudios.com 1 American Lane, Greenwich, CT 06831-2560
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk