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

Mehdi Amini via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 1 17:07:00 PST 2017


Right, I don’t think it is a good idea for clang as a project to have important default configuration flags that diverge between platform/target, like the default language. This is reducing portability and quite user hostile IMO.

For example if a platform does not support exception, the driver can error if -fno-exceptions isn’t supplied, requiring an opt-in from the user.

— 
Mehdi



> On Mar 1, 2017, at 5:03 PM, Robinson, Paul <paul.robinson at sony.com> wrote:
> 
> Replies from Mehdi to the commit message for r296554 indicate that
> he is not too happy with PS4 changing its default dialect.
> 
> I think the discussion ought to take place here and invite him to
> put his comments on this thread, where it is likely to be more visible.
> --paulr
> 
>> -----Original Message-----
>> From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of
>> Robinson, Paul via cfe-dev
>> Sent: Wednesday, March 01, 2017 9:00 AM
>> To: cfe-dev at lists.llvm.org
>> Subject: Re: [cfe-dev] Setting default dialect to C++11
>> 
>> FTR as of r296554 the default for PS4 target is now C++11.
>> Because we have a couple of public bots using that default target,
>> any new tests or changes will need to be tolerant of a C++11 default.
>> 
>> This does not change the default for the world, but at least it will
>> ensure that tests going forward will be exercising C++11 code paths.
>> Thanks,
>> --paulr
>> 
>>> -----Original Message-----
>>> From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Joerg
>>> Sonnenberger via cfe-dev
>>> Sent: Monday, February 27, 2017 12:03 PM
>>> To: cfe-dev at lists.llvm.org
>>> Subject: Re: [cfe-dev] Setting default dialect to C++11
>>> 
>>> On Sun, Feb 26, 2017 at 05:38:03PM -0800, David Majnemer via cfe-dev
>>> wrote:
>>>>> Generally I think this is overdue, and that we should go straight to
>>> C++14
>>>>> rather than stopping at C++11 (like GCC did).
>>>>> 
>>>> 
>>>> This policy makes sense. With GCC's change, projects must explicitly
>>>> specify a -std if they insist on a particular language standard and as
>>> such
>>>> changing Clang's default shouldn't make things any better or worse.
>>> 
>>> Projects in active maintainance are mostly migrating to C++11 already.
>>> They don't care about this. But there is a huge existing code base that
>>> doesn't specify -std=XXX and for which bad things can happen. Compile
>>> errors are on the more harmless side of things.
>>> 
>>> Pointing to GCC doesn't really change anything. They don't maintain
>>> those code bases either.
>>> 
>>> Joerg
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> _______________________________________________
>> 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