Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
Qt Creator 3.3.0
-
windows 7
Description
when i have a macro whose definition contain __pragma to disable a warning inline the macro code, qt creator shows me an error in the next line saying
"expected token ; got __pragma
example macro:
#define TRACE_WRITE(_engine_, _severitymask_, _message_) \ do \ { \ __pragma(warning(push)) __pragma(warning(disable:4127))\ const Tracing::TraceEngine& engine_used_for_trace_write = _engine_; \ if (CHECK_TRACE_SEVERITY(engine_used_for_trace_write, (_severitymask_))) \ TRACE_WRITE_UNCHECKED(engine_used_for_trace_write, (_severitymask_), (_message_)); \ } while(false) \ __pragma(warning(pop))
msvc would create a warning because of while(false) , so __para is used to supress it.
Attachments
Issue Links
- is replaced by
-
QTCREATORBUG-13905 Qt Creator underlines code following Q_OBJECT in Qt 5 / dev branch
- Closed