Skip to content

Commit ba6fa80

Browse files
committed
Enforce C11
1 parent 7841e9b commit ba6fa80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/xy.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
#define _XY_Maintain_URL "https://github.com/RubyMetric/chsrc/blob/main/lib/xy.h"
2323
#define _XY_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc/blob/main/lib/xy.h"
2424

25+
#if defined(__STDC__) && __STDC_VERSION__ < 201112L
26+
# error "xy.h requires C11 or later, please use a new compiler which at least supports C11"
27+
#endif
28+
29+
#if defined(__STDC__) && __STDC_VERSION__ < 201710L
30+
# warning "xy.h recommends a C17 or later compiler"
31+
#endif
2532

2633
#include <assert.h>
2734
#include <stdarg.h>

0 commit comments

Comments
 (0)