[Development] Removing the -c++11 option from configure
Stephen Kelly
steveire at gmail.com
Tue Mar 24 19:40:32 CET 2015
Thiago Macieira wrote:
> The reason we prefer -std=c++11 is that it allows us to write code that
> doesn't trip GNU extensions unlikely to be found on MSVC and other
> compilers.
What is the likelyhood of that? No one is going to accidentally add an
`__attribute ((strong))` namespace in Qt.
In particular, what features are you afraid of accidentally using (locally
on your machine before CI gets a look) which are available with -std=gnu++11
but not available with -std=c++11?
> So I really want to keep -std=c++11, except for a module or two
> that really need it (QtBluetooth comes to mind due to BlueZ headers
> assuming GCC extensions are enabled).
Yes, changing the default mode of the compiler ('enable extensions') is bad
for dependencies. Dependency code ifdefs on __STRICT_ANSI__.
> User code has been using this flag just fine for a couple of years, so I
> don't think they need -std=gnu++11.
Yes. I did see a lot of issues pop up around mingw, but as you say, Qt
people haven't noticed anything. Is that really a good reason not to fix it?
Unreported bugs are fixed all the time.
Anyway, now you know the problem, you can do what you think is best.
Thanks,
Steve.
More information about the Development
mailing list