Skip to content

Commit 351b5d7

Browse files
authored
Merge pull request #234 from TheMode/tcc-patch
Fix TCC compile
2 parents 59b5593 + 44a4428 commit 351b5d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/yyjson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# pragma clang diagnostic ignored "-Wunused-label"
3636
# pragma clang diagnostic ignored "-Wunused-macros"
3737
# pragma clang diagnostic ignored "-Wunused-variable"
38-
#elif defined(__GNUC__)
38+
#elif YYJSON_IS_REAL_GCC
3939
# pragma GCC diagnostic ignored "-Wunused-function"
4040
# pragma GCC diagnostic ignored "-Wunused-parameter"
4141
# pragma GCC diagnostic ignored "-Wunused-label"

src/yyjson.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@
418418

419419
/** stdbool (C89 compatible) */
420420
#if (defined(YYJSON_HAS_STDBOOL_H) && YYJSON_HAS_STDBOOL_H) || \
421-
(yyjson_has_include(<stdbool.h>) && !defined(__STRICT_ANSI__)) || \
422-
YYJSON_MSC_VER >= 1800 || YYJSON_STDC_VER >= 199901L
421+
YYJSON_MSC_VER >= 1800 || YYJSON_STDC_VER >= 199901L || \
422+
(yyjson_has_include(<stdbool.h>) && !defined(__STRICT_ANSI__))
423423
# include <stdbool.h>
424424
#elif !defined(__bool_true_false_are_defined)
425425
# define __bool_true_false_are_defined 1
@@ -474,7 +474,7 @@ extern "C" {
474474
# pragma clang diagnostic push
475475
# pragma clang diagnostic ignored "-Wunused-function"
476476
# pragma clang diagnostic ignored "-Wunused-parameter"
477-
#elif defined(__GNUC__)
477+
#elif YYJSON_IS_REAL_GCC
478478
# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
479479
# pragma GCC diagnostic push
480480
# endif

0 commit comments

Comments
 (0)