mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 01:00:46 +00:00
take -pedantic into account to validate CGLM_USE_ANONYMOUS_STRUCT
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
/* The user has defined CGLM_NO_ANONYMOUS_STRUCT. This used to be the
|
||||
* only #define governing the use of anonymous structs, so for backward
|
||||
* compatibility, we still honor that choice and disable them. */
|
||||
# define CGLM_USE_ANONYMOUS_STRUCT 0
|
||||
/* Disable anonymous structs if strict ANSI mode is enabled for C89 or C99 */
|
||||
# elif defined(__STRICT_ANSI__) && \
|
||||
(!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 201112L))
|
||||
/* __STRICT_ANSI__ is defined and we're in C89
|
||||
* or C99 mode (C11 or later not detected) */
|
||||
# define CGLM_USE_ANONYMOUS_STRUCT 0
|
||||
# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
|
Reference in New Issue
Block a user