Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.0
-
None
-
-
62d02c1d5 (dev), 1a1b1669f (6.7)
Description
The following code causes MOC to choke:
#include <QObject> namespace problem { #define FOR_EACH_ITEM( CALL ) \ CALL( EXAMPLE ) \ CALL( 123_EXAMPLE ) \ CALL( OTHER_EXAMPLE ) enum FooItems { #define ENUM_ITEM(NAME, ...) FOO ## NAME, FOR_EACH_ITEM( ENUM_ITEM ) }; } class Foo : public QObject { Q_OBJECT };
The problem appears to be related to macro arguments that start with numbers. Output is:
15: Parse error at "FOO123"
This may be a regression versus 5.12. (Have not tested 5.13, but both 5.14 and 5.15 are affected.)