Commit 9c8b0c2
Workaround for syntax error on Microsoft specific __pragma keyword (danmar#982)
__pragma is Microsoft specific keyword equivalent to C99 _Pragma operator
https://msdn.microsoft.com/en-us/library/d9x1s805.aspx
https://gcc.gnu.org/onlinedocs/cpp/Pragmas.html
http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas
It seems cppcheck does not support _Pragma at the moment.
This change will fix syntax error on code that looks like this:
#define MY_DEPRECATED_ENUM(X) X __pragma(deprecated(X))
enum myEnum
{
myEnum_1 = 1,
MY_DEPRECATED_ENUM(myEnum_2) = 2,
myEnum_3,
myEnum_4,
};
int main()
{
myEnum a = myEnum_3;
printf("%d", a);
return 0;
}
This change was fiscussed here: https://sourceforge.net/p/cppcheck/discussion/general/thread/1808a46b/1 parent 2b717c6 commit 9c8b0c2
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3620 | 3620 | | |
3621 | 3621 | | |
3622 | 3622 | | |
| 3623 | + | |
3623 | 3624 | | |
0 commit comments