r296554 - [PS4] Set our default dialect to C++11. NFC for other targets.
Robinson, Paul via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 1 17:03:16 PST 2017
Mehdi, again I invite you to discuss this on the cfe-dev thread rather than here. I have posted a reply there to bump it up, and any comments you have will be more visible and better serve the community over there.
Thanks,
--paulr
From: mehdi.amini at apple.com [mailto:mehdi.amini at apple.com]
Sent: Wednesday, March 01, 2017 3:52 PM
To: Sean Silva
Cc: Robinson, Paul; cfe-commits
Subject: Re: r296554 - [PS4] Set our default dialect to C++11. NFC for other targets.
On Mar 1, 2017, at 3:24 PM, Sean Silva <chisophugis at gmail.com<mailto:chisophugis at gmail.com>> wrote:
On Wed, Mar 1, 2017 at 10:35 AM, Mehdi Amini <mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>> wrote:
I’m not sure I find this nice to see this upstream.
I not fond in general of this kind of difference in behavior. I don’t think it is good for clang to have different default for this kind of settings depending on the platform. It does not provide a very good user experience from a cross-platform point of view (i.e. my compiler behaves very differently when I target one platform instead of another).
What I like about it is that the upstream PS4 bots now test that we don't depend on the C++98 default language standard in tests, which is net positive IMO since it facilitates future changes. Should this be a point of vendor/platform extensibility? That's a question for cfe-dev, but I don't think it's unreasonable. (see also: PS4 has -fno-rtti and -fno-exceptions by default, even though users already know to pass the right flags and expect to have to).
I rather have the driver rejecting “unsupported configuration”, requiring the right flags, instead of diverging the default.
—
Mehdi
On Feb 28, 2017, at 11:22 PM, Sean Silva via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
Nice!
-- Sean Silva
On Tue, Feb 28, 2017 at 5:01 PM, Paul Robinson via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
Author: probinson
Date: Tue Feb 28 19:01:10 2017
New Revision: 296554
URL: http://llvm.org/viewvc/llvm-project?rev=296554&view=rev
Log:
[PS4] Set our default dialect to C++11. NFC for other targets.
Reapplies r296209 now that r296549 has fixed what really seems to be
the last problematic test.
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=296554&r1=296553&r2=296554&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Feb 28 19:01:10 2017
@@ -1582,7 +1582,11 @@ void CompilerInvocation::setLangDefaults
case IK_PreprocessedCXX:
case IK_ObjCXX:
case IK_PreprocessedObjCXX:
- LangStd = LangStandard::lang_gnucxx98;
+ // The PS4 uses C++11 as the default C++ standard.
+ if (T.isPS4())
+ LangStd = LangStandard::lang_gnucxx11;
+ else
+ LangStd = LangStandard::lang_gnucxx98;
break;
case IK_RenderScript:
LangStd = LangStandard::lang_c99;
_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170302/073c48dc/attachment-0001.html>
More information about the cfe-commits
mailing list