Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.12.2
-
None
Description
// qtbase\bin\moc.exe -Iqtbase\include t.h -ot_moc.cpp #pragma once #include <QtCore/QObject> struct C final : public QObject { Q_OBJECT enum class E { V [[maybe_unused]] }; };
This code gives the following error:
t.h(7): Parse error at "V"
This is considered valid c++ code according to cppreference: https://en.cppreference.com/w/cpp/language/attributes/maybe_unused and was recently used by clang to suppress warnings: https://bugs.llvm.org/show_bug.cgi?id=36231