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

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 2 09:53:47 PST 2017


On Thu, Mar 2, 2017 at 9:40 AM Joerg Sonnenberger via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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.
>

Often in small examples I hit it with library rather than language first -
which can be a bit more confusing ("what do you mean you can't find
unique_ptr, I totally included <memory>").


>
> Joerg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170302/042785c5/attachment.html>


More information about the cfe-dev mailing list