[Development] #error for unreleased MSVC versions

Thiago Macieira thiago.macieira at intel.com
Thu Oct 24 18:53:24 CEST 2013

On quinta-feira, 24 de outubro de 2013 17:42:01, Olivier Goffart wrote:
> On Thursday 24 October 2013 14:49:39 Thiago Macieira wrote:
> > Hello
> > 
> > I'm going to add an #error to qcompilerdetection.h for any unreleased
> > version of MSVC.
> I am opposed to that.
> Can I do the same for any unreleased version of ICC?

Yes, this also applies to ICC on Windows, since it follows the MSVC behaviour.

It's not needed for ICC on Linux or OS X because it follows the GCC and Clang 
behaviour there, which is forwards compatible with future version of those 
compilers (and between one another too).

> And a qFatal if it Qt runs on any unreleased CPU?

That's just stupid.

I'm asking a serious question. There's a reason for it. And there's also 
precedent, with the warning that Qt printed when run on unreleased versions of 
Mac OS X. That was annoying to people, but good in hindsight since we had to 
apply fixes for 10.9 so Qt would work properly there.

> > ==> In other words, adding new Q_COMPILER_xxx defines for C++11 for MSVC
> > breaks binary compatibility <===
> I don't understand your conclusion. What new Q_COMPILER_xxx breaks binary
> compatibility ?
> How would the ability to turn new c++ feature off help?

[erase text I had written]

After writing an example, I realise that there is a solution and it's the same 
I'm implementing for GCC: we need the qstring_compat.cpp (for example) that I 
added in 

It's not exactly the same problem, but it is quite similar. It involves an 
upgrade and new C++11 features being supported. I wrote the above for an 
upgrade of the compiler, while keeping Qt the same. But it turns out it also 
applies for upgrading Qt and keeping the compiler the same. Sounds obvious now 
that I put it into words.

Given the lower urgency of the problem, I withdraw my request to make this an 

A simple warning at the end of configure should be enough.

> As for 2, does it applies for template function? (can we change / remove
> symbols of template functions?)

Only if we used extern templates, which we don't.

> > Retroactively, that means Qt 5.0 and 5.1 are unsupported on MSVC 2013 and
> > are not binary compatible with Qt 5.2 there.
> What exactly is not binary compatible?

It was a declaration, even if it was in fact binary compatible. We'd simply 
not support upgrading Qt from 5.0 and 5.1 (even if you managed to compile it) 
to Qt 5.2 and running your program without recompiling.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131024/835b4867/attachment.sig>

More information about the Development mailing list