mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:32:55 +00:00
[REACTOS] Raise C standard to gnu99
And remove -Wdeclaration-after-statement
This commit is contained in:
parent
a0283ecea3
commit
95483b42ea
2 changed files with 3 additions and 23 deletions
|
@ -52,7 +52,7 @@ if(NOT GCC_VERSION VERSION_LESS 4.8)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_compile_flags_language("-std=gnu89 -Wno-microsoft" "C")
|
add_compile_flags_language("-std=gnu99 -Wno-microsoft" "C")
|
||||||
set(CMAKE_LINK_DEF_FILE_FLAG "")
|
set(CMAKE_LINK_DEF_FILE_FLAG "")
|
||||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||||
set(CMAKE_LINK_LIBRARY_SUFFIX "")
|
set(CMAKE_LINK_LIBRARY_SUFFIX "")
|
||||||
|
@ -70,7 +70,6 @@ if(DBG)
|
||||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_compile_flags_language("-Wold-style-declaration" "C")
|
add_compile_flags_language("-Wold-style-declaration" "C")
|
||||||
endif()
|
endif()
|
||||||
add_compile_flags_language("-Wdeclaration-after-statement" "C")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX")
|
add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX")
|
||||||
|
@ -351,8 +350,8 @@ endif()
|
||||||
|
|
||||||
function(fixup_load_config _target)
|
function(fixup_load_config _target)
|
||||||
get_target_property(PEFIXUP native-pefixup IMPORTED_LOCATION_NOCONFIG)
|
get_target_property(PEFIXUP native-pefixup IMPORTED_LOCATION_NOCONFIG)
|
||||||
add_custom_command(TARGET ${_target} POST_BUILD
|
add_custom_command(TARGET ${_target} POST_BUILD
|
||||||
COMMAND "${PEFIXUP}"
|
COMMAND "${PEFIXUP}"
|
||||||
"$<TARGET_FILE:${_target}>"
|
"$<TARGET_FILE:${_target}>"
|
||||||
COMMENT "Patching in LOAD_CONFIG")
|
COMMENT "Patching in LOAD_CONFIG")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
|
@ -16,12 +16,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT
|
|
||||||
#else
|
|
||||||
#define PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* CLANG must safe non-volatiles, because it uses a return-twice algorithm */
|
/* CLANG must safe non-volatiles, because it uses a return-twice algorithm */
|
||||||
#if defined(__clang__) && !defined(_SEH3$_FRAME_ALL_NONVOLATILES)
|
#if defined(__clang__) && !defined(_SEH3$_FRAME_ALL_NONVOLATILES)
|
||||||
#define _SEH3$_FRAME_ALL_NONVOLATILES 1
|
#define _SEH3$_FRAME_ALL_NONVOLATILES 1
|
||||||
|
@ -358,9 +352,6 @@ _Pragma("GCC diagnostic pop") \
|
||||||
(void)&&_SEH3$_l_OnException; \
|
(void)&&_SEH3$_l_OnException; \
|
||||||
(void)&&_SEH3$_l_BeforeFilterOrFinally; \
|
(void)&&_SEH3$_l_BeforeFilterOrFinally; \
|
||||||
(void)&&_SEH3$_l_FilterOrFinally; \
|
(void)&&_SEH3$_l_FilterOrFinally; \
|
||||||
\
|
|
||||||
_Pragma("GCC diagnostic push") \
|
|
||||||
PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
|
||||||
\
|
\
|
||||||
/* Count the try level. Outside of any __try, _SEH3$_TryLevel is 0 */ \
|
/* Count the try level. Outside of any __try, _SEH3$_TryLevel is 0 */ \
|
||||||
enum { \
|
enum { \
|
||||||
|
@ -373,8 +364,6 @@ PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
||||||
\
|
\
|
||||||
/* Allocate a registration frame */ \
|
/* Allocate a registration frame */ \
|
||||||
volatile SEH3$_REGISTRATION_FRAME _SEH3$_AUTO_CLEANUP _SEH3$_TrylevelFrame; \
|
volatile SEH3$_REGISTRATION_FRAME _SEH3$_AUTO_CLEANUP _SEH3$_TrylevelFrame; \
|
||||||
\
|
|
||||||
_Pragma("GCC diagnostic pop") \
|
|
||||||
\
|
\
|
||||||
goto _SEH3$_l_BeforeTry; \
|
goto _SEH3$_l_BeforeTry; \
|
||||||
/* Silence warning */ goto _SEH3$_l_AfterTry; \
|
/* Silence warning */ goto _SEH3$_l_AfterTry; \
|
||||||
|
@ -390,9 +379,6 @@ _Pragma("GCC diagnostic pop") \
|
||||||
\
|
\
|
||||||
_SEH3$_l_BeforeTry: (void)0; \
|
_SEH3$_l_BeforeTry: (void)0; \
|
||||||
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
|
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
|
||||||
\
|
|
||||||
_Pragma("GCC diagnostic push") \
|
|
||||||
PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
|
||||||
\
|
\
|
||||||
/* Forward declaration of the filter function */ \
|
/* Forward declaration of the filter function */ \
|
||||||
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \
|
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \
|
||||||
|
@ -440,9 +426,6 @@ PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
||||||
\
|
\
|
||||||
_SEH3$_l_BeforeTry: (void)0; \
|
_SEH3$_l_BeforeTry: (void)0; \
|
||||||
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
|
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
|
||||||
\
|
|
||||||
_Pragma("GCC diagnostic push") \
|
|
||||||
PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
|
||||||
\
|
\
|
||||||
/* Forward declaration of the finally function */ \
|
/* Forward declaration of the finally function */ \
|
||||||
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \
|
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \
|
||||||
|
@ -479,8 +462,6 @@ PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \
|
||||||
\
|
\
|
||||||
/* Implementation of the auto cleanup function */ \
|
/* Implementation of the auto cleanup function */ \
|
||||||
_SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
|
_SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
|
||||||
\
|
|
||||||
_Pragma("GCC diagnostic pop") \
|
|
||||||
\
|
\
|
||||||
/* Close the outer scope */ \
|
/* Close the outer scope */ \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue