[cfe-dev] Setting default dialect to C++11

Khem Raj via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 28 10:49:07 PDT 2017


On Thu, Aug 24, 2017 at 2:10 PM, Robinson, Paul via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Sylvestre Ledru reports that changing the default to C++11 or C++14 "would
> fix more than 70 issues" in building Debian with Clang.  See the "[cfe-dev]
> Using 5.0rc2 to rebuild Debian" thread.
>
>
>
> It's clearly too late to make a change like this for 5.0.  Is there any
> remaining roadblock to making the change for 6.0 (trunk)?
>

+1

I think switching to gnu++14 would match with latest gcc release, more
and more packages are just assuming c++11 and newer since gcc defaults
became gnu++14
In Yocto/OpenEmbedded, I can confirm that we will have lot of packages fixed too
althogh currently we explicitly force it through compiler flags to
individual recipes
when needed but thats not sufficient sometimes due to configure checks not using
the flags and similar checks in other build systems.

tries a patch like below but did not apply it since did not want to
deviate from defaults.

https://github.com/kraj/meta-clang/commit/d57536af86b27779125cb30202d562d6d4fbbfdc



> --paulr
>
>
>
> From: Martin J. O'Riordan [mailto:martin.oriordan at movidius.com]
> Sent: Sunday, May 21, 2017 1:09 PM
> To: 'Richard Smith'
> Cc: Robinson, Paul; 'clang developer list'
> Subject: RE: [cfe-dev] Setting default dialect to C++11
>
>
>
> Thanks Richard,
>
>
>
> Any chance the “Subject” could change to “RE: [cfe-dev] Setting default
> dialect to C++14”, simply to make it clear what is being discussed (I didn’t
> want to pre-emptively make such a change since I don’t own the discussion)?
> I’m quite happy with the default being C++14, and for that matter, soon
> defaulting to C++17, but the discussion should be clear and unambiguous -
> IMO defaulting to tracking the current Standard is the better choice, with
> ‘-std=’ being used to specify an earlier Standard, or a proposed and
> experimental future standard.
>
>
>
>             MartinO
>
>
>
> From: metafoo at gmail.com [mailto:metafoo at gmail.com] On Behalf Of Richard
> Smith
> Sent: 21 May 2017 20:23
> To: Martin J. O'Riordan <martin.oriordan at movidius.com>
> Cc: Robinson, Paul <paul.robinson at sony.com>; clang developer list
> <cfe-dev at lists.llvm.org>
> Subject: Re: [cfe-dev] Setting default dialect to C++11
>
>
>
> The proposal is to go straight to C++14. That both matches GCC's current
> default and the suggested policy of setting the default to the most recent
> published standard for which we have sufficiently mature support.
>
>
>
> On 21 May 2017 at 03:54, Martin J. O'Riordan <martin.oriordan at movidius.com>
> wrote:
>
> From the “Subject” and earlier messages in this thread, it would appear that
> the proposed default Standard is C++11; but the words in this message and a
> few other messages seem to suggest that the proposed default Standard is
> C++14.
>
>
>
> I’m just curious about the proposed default, is it to be C++11 or C++14?  I
> don’t have any argument against changing the default to either, but would
> like to know what is really being proposed.
>
>
>
> Thanks,
>
>
>
>             MartinO
>
>
>
> From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Richard
> Smith via cfe-dev
> Sent: 19 May 2017 18:12
> To: Robinson, Paul <paul.robinson at sony.com>
> Cc: Clang Dev <cfe-dev at lists.llvm.org>
> Subject: Re: [cfe-dev] Setting default dialect to C++11
>
>
>
> On 18 May 2017 11:18 pm, "Robinson, Paul" <paul.robinson at sony.com> wrote:
>
> Not to forget that Charles Li did a pile of work over the past year or so to
> tidy up a lot of the tests.  Given that the PS4 target already defaults to
> C++11, I should hope there would be little left to do.
>
> Right, and indeed we have buildbots that test that a C++11 default works. So
> the remaining cleanups would be for C++14-specific issues, which should be
> minimal in comparison to the great work Charles did.
>
> --paulr
>
>
>
> From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Richard
> Smith via cfe-dev
> Sent: Thursday, May 18, 2017 8:30 PM
> To: Tim Northover
> Cc: cfe-dev at lists.llvm.org
>
>
> Subject: Re: [cfe-dev] Setting default dialect to C++11
>
>
>
> On 18 May 2017 at 19:38, Tim Northover <t.p.northover at gmail.com> wrote:
>
> On 18 May 2017 at 18:56, Richard Smith <richard at metafoo.co.uk> wrote:
>> Agreed. I think there's sufficient (although not unanimous) agreement that
>> we should increase our default language standard; what we need is for
>> someone to work through the immediate fallout from doing so (particularly
>> in
>> the test suite).
>
> I'll see what I can do tomorrow. Hopefully I can at least get some
> numbers here by the end of the day. Possibly patches; what's our
> preferred solution to failures: fix the code (within reason), or
> -std=c++98?
>
>
>
> If the difference is interesting, test it in both modes. If the test is
> C++98-specific or has uninteresting diagnostic differences, -std=c++98.
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list