Changed printf attribute check to look for gcc and clang compilers specifically.
This commit is contained in:
parent
f815c849c2
commit
3266a20970
|
@ -167,7 +167,7 @@ typedef uint8 (*readfunc)(uint32 A);
|
||||||
#define __FCEU_PRINTF_FORMAT _In_z_ _Printf_format_string_
|
#define __FCEU_PRINTF_FORMAT _In_z_ _Printf_format_string_
|
||||||
#define __FCEU_PRINTF_ATTRIBUTE( fmt, va )
|
#define __FCEU_PRINTF_ATTRIBUTE( fmt, va )
|
||||||
|
|
||||||
#elif FCEU_HAS_CPP_ATTRIBUTE(format)
|
#elif defined(__GNUC__) || defined(__clang__) || FCEU_HAS_CPP_ATTRIBUTE(format)
|
||||||
// GCC and Clang compilers will perform printf format type checks, useful for catching format errors.
|
// GCC and Clang compilers will perform printf format type checks, useful for catching format errors.
|
||||||
#define __FCEU_PRINTF_FORMAT
|
#define __FCEU_PRINTF_FORMAT
|
||||||
#define __FCEU_PRINTF_ATTRIBUTE( fmt, va ) __attribute__((__format__(__printf__, fmt, va)))
|
#define __FCEU_PRINTF_ATTRIBUTE( fmt, va ) __attribute__((__format__(__printf__, fmt, va)))
|
||||||
|
|
Loading…
Reference in New Issue