[Development] -Winconsistent-missing-override warning with latest Xcode and Qt 5.5

Edward Sutton edward.sutton at subsite.com
Wed Jul 1 17:15:19 CEST 2015


Same issue here.

I had to modify qobjectdefs.h to define Q_OBJECT_NO_OVERRIDE_WARNING to nothing.


#if defined(Q_CC_CLANG) && Q_CC_CLANG >= 306

//#  define Q_OBJECT_NO_OVERRIDE_WARNING      QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override”)

#  define Q_OBJECT_NO_OVERRIDE_WARNING

#else

#  define Q_OBJECT_NO_OVERRIDE_WARNING

#endif

Is there a work-around I could use in my Qt project file?

-Ed

Qt 5.5.0 release
iOS & OS X
Command Line Tools (OS X 10.10) 6.4.


On Jul 1, 2015, at 9:50 AM, Stephen Kelly <steveire at gmail.com<mailto:steveire at gmail.com>> wrote:

Hello,

I just tried building Qt 5.5 with Xcode 6.3.2. It built, but emitted
many warnings for each translation unit about
-Winconsistent-missing-override.

In file included from
/Users/ske/dev/src/qt55/qtdeclarative/src/qml/debugger/qqmldebugserver.cpp:34:
In file included from
/Users/ske/dev/src/qt55/qtdeclarative/src/qml/debugger/qqmldebugserver_p.h:39:
In file included from
../../include/QtQml/5.5.0/QtQml/private/qqmldebugservice_p.h:1:
../../include/QtQml/5.5.0/QtQml/private/../../../../../../src/qml/debugger/qqmldebugservice_p.h:60:5:
warning: unknown warning group '-Winconsistent-missing-override',
ignored [-Wunknown-pragmas]
   Q_OBJECT
   ^

/Users/ske/dev/prefix55/lib/QtCore.framework/Headers/qobjectdefs.h:156:5:
note: expanded from macro 'Q_OBJECT'
   Q_OBJECT_NO_OVERRIDE_WARNING \
   ^

/Users/ske/dev/prefix55/lib/QtCore.framework/Headers/qobjectdefs.h:146:45:
note: expanded from macro 'Q_OBJECT_NO_OVERRIDE_WARNING'
£  define Q_OBJECT_NO_OVERRIDE_WARNING
QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override")
                                           ^

/Users/ske/dev/prefix55/lib/QtCore.framework/Headers/qcompilerdetection.h:1125:49:
note: expanded from macro 'QT_WARNING_DISABLE_CLANG'
£  define QT_WARNING_DISABLE_CLANG(text)        QT_DO_PRAGMA(clang
diagnostic ignored text)
                                               ^

/Users/ske/dev/prefix55/lib/QtCore.framework/Headers/qcompilerdetection.h:1096:49:
note: expanded from macro 'QT_DO_PRAGMA'
£define QT_DO_PRAGMA(text)                      _Pragma(£text)
                                               ^

<scratch space>:23:27: note: expanded from here
clang diagnostic ignored "-Winconsistent-missing-override"
                         ^

I see qtbase commit v5.5.0-alpha1~786 (Fix Clang warning about
inconsistent use of C++11 override, 2014-12-18). It attempts to affect
'Q_CC_CLANG >= 306'. Do the Qt macros know the difference between
'clang' and 'apple clang'? All version checks of 'clang'-based
compilers must be aware of the difference and check both compilers.

Thanks,

Steve.
_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150701/ff6527d0/attachment.html>


More information about the Development mailing list