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

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 2 08:57:20 PST 2017

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. Mandating what standard your code uses
is actually a much saner choice. You are still ignoring my main point:
there is no easy way to tell if a given code base needs -std=c++03.
Older versions of SOCI for example worked perfectly well when compiled
in C++11 mode, until you actually triggered an error. The error case
then was far from pretty.


More information about the cfe-dev mailing list