Skip to content

Commit 96a08fa

Browse files
committed
ERROR_MSG color also with GCC 8
__VA_OPT__ seem to be supported since GCC 8.1 for both C and C++: <https://gcc.gnu.org/onlinedocs/gcc-8.1.0/cpp/Variadic-Macros.html>
1 parent 8ca213e commit 96a08fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gpujpeg_common_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ extern const char *gj_fg_red;
120120
extern const char *gj_fg_yellow;
121121
extern const char *gj_term_reset;
122122
// check __VA_OPT__ presence
123-
#if __STDC_VERSION__ >= 202311L || __cplusplus >= 202002L || __GNUC__ >= 12 || \
123+
#if __STDC_VERSION__ >= 202311L || __cplusplus >= 202002L || __GNUC__ >= 8 || \
124124
__clang_major__ >= 9
125125
#define ERROR_MSG(fmt, ...) \
126126
(void)fprintf(stderr, "%s[GPUJPEG] [Error] " fmt "%s", gj_fg_red __VA_OPT__(, ) __VA_ARGS__, gj_term_reset)

0 commit comments

Comments
 (0)