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

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 2 09:40:42 PST 2017


On Thu, Mar 02, 2017 at 05:01:52PM +0000, David Blaikie wrote:
> On Thu, Mar 2, 2017 at 8:58 AM Joerg Sonnenberger via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> 
> > On Thu, Mar 02, 2017 at 07:24:15AM -0800, Tim Northover wrote:
> > > On 2 March 2017 at 04:01, Joerg Sonnenberger via cfe-dev
> > > <cfe-dev at lists.llvm.org> wrote:
> > > > On Wed, Mar 01, 2017 at 05:07:00PM -0800, Mehdi Amini via cfe-dev
> > wrote:
> > > > I somewhat disagree and that's why I didn't have a problem with the
> > > > change. As long as we silently miscompile C++03 code when enabling
> > C++11
> > > > or later, I don't think it should be a general default.
> > >
> > > And I think that would commit us to keep C++03 forever, which is
> > > untenable. Further, I think expecting the minimal maintenance required
> > > to add "-std=c++03" if a project needs it is not unreasonable.
> >
> > Is it untenable? Why? POLA says to give a reasonable behavior and breaking
> > existing code is not reasonable.
> 
> 
> Though it's pretty astonishing to new users when they write current C++ and
> the compiler doesn't accept it.

We already warn for a lot of constructs that they require C++11 or just
allow them in first place in the default mode.

Joerg



More information about the cfe-dev mailing list