mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Enable -Wundef
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -32,7 +32,7 @@ WARNFLAGS := -Werror -Wall -Wextra -Wpedantic -Wno-sign-compare -Wchkp \
|
|||||||
-Wunknown-pragmas -Wstrict-overflow=5 -Wstringop-overflow=4 \
|
-Wunknown-pragmas -Wstrict-overflow=5 -Wstringop-overflow=4 \
|
||||||
-Walloc-zero -Wduplicated-cond -Wfloat-equal -Wshadow \
|
-Walloc-zero -Wduplicated-cond -Wfloat-equal -Wshadow \
|
||||||
-Wcast-qual -Wcast-align -Wlogical-op -Wnested-externs \
|
-Wcast-qual -Wcast-align -Wlogical-op -Wnested-externs \
|
||||||
-Wno-aggressive-loop-optimizations -Winline \
|
-Wno-aggressive-loop-optimizations -Winline -Wundef \
|
||||||
-Wstrict-prototypes -Wold-style-definition
|
-Wstrict-prototypes -Wold-style-definition
|
||||||
|
|
||||||
# Overridable CFLAGS
|
# Overridable CFLAGS
|
||||||
|
|||||||
18
include/extern/stdnoreturn.h
vendored
18
include/extern/stdnoreturn.h
vendored
@@ -9,16 +9,28 @@
|
|||||||
#ifndef EXTERN_STDNORETURN_H
|
#ifndef EXTERN_STDNORETURN_H
|
||||||
#define EXTERN_STDNORETURN_H
|
#define EXTERN_STDNORETURN_H
|
||||||
|
|
||||||
|
#if defined(__STDC_VERSION__)
|
||||||
#if __STDC_VERSION__ >= 201112L
|
#if __STDC_VERSION__ >= 201112L
|
||||||
/* C11 or newer */
|
/* C11 or newer */
|
||||||
#define noreturn _Noreturn
|
#define noreturn _Noreturn
|
||||||
#elif __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ >= 5))
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(noreturn)
|
||||||
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ >= 5))
|
||||||
/* GCC 2.5 or newer */
|
/* GCC 2.5 or newer */
|
||||||
#define noreturn __attribute__ ((noreturn))
|
#define noreturn __attribute__ ((noreturn))
|
||||||
#elif _MSC_VER >= 1310
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(noreturn)
|
||||||
|
#if _MSC_VER >= 1310
|
||||||
/* MS Visual Studio 2003/.NET Framework 1.1 or newer */
|
/* MS Visual Studio 2003/.NET Framework 1.1 or newer */
|
||||||
#define noreturn _declspec(noreturn)
|
#define noreturn _declspec(noreturn)
|
||||||
#else
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(noreturn)
|
||||||
/* Unsupported, but no need to throw a fit */
|
/* Unsupported, but no need to throw a fit */
|
||||||
#define noreturn
|
#define noreturn
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user