Hi,
I'm trying to create a macro that will use the #pragma push and pop to suppress a specific warning.
To do so, I have tried doing the following
#define DEFINE_THIS_MODULE_NAME(_name_) \ _Pragma("diag_push"); \ _Pragma("diag_suppress 179"); \ static char const g_this_module_name[] = _name_; \ _Pragma("diag_pop");
As you can see here, the diag_suppress seems to be ineffective
How to use _Pragma inside a macro to suppress a warning?
Best regards,
Gabriel
---
Additional info
C std: C11
Code Composer Studio
Version: 12.2.0.00009
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 11.0.13+8
Java version: 11.0.13