So I got this:
Code:
#ifdef __GNUC__
#define PAW__ATTR_PRINTF(ARGS_POS,VA_POS) \
__attribute__((format (printf, ARGS_POS, VA_POS)))
#define PAW__ATTR_WPRINTF(ARGS_POS,VA_POS) \
__attribute__((format (wprintf, ARGS_POS, VA_POS)))
#else
#define PAW__ATTR_PRINTF(ARGS_POS,VA_POS)
#define PAW__ATTR_WPRINTF(ARGS_POS,VA_POS)
#endif
#ifdef _DEBUG
#define PAW_ATTR_PRINTF(ARGS_POS,VA_POS) PAW__ATTR_PRINTF(ARGS_POS,VA_POS)
#define PAW_ATTR_WPRINTF(ARGS_POS,VA_POS) PAW__ATTR_WPRINTF(ARGS_POS,VA_POS)
#else
#define PAW_ATTR_PRINTF(ARGS_POS,VA_POS)
#define PAW_ATTR_WPRINTF(ARGS_POS,VA_POS)
#endif
I tried just printf but gcc did not like that because the arguments were of wchar_t const * like wprintf so I tried wprintf and gcc still didn't like it because there's no such attribute, is there any way to get gcc to check the arguments match what is expected in those functions?