Skip to content

Commit 04ab949

Browse files
author
Tilmann Scheller
committed
Enforce pure C99 build.
Building with -std=c99 is not sufficient to enforce a pure C99 build as it still allows GNU extensions which don't conflict with C99 to be used. Add -pedantic to the build options to ensure that the codebase is only using C99 constructs and the build will fail whenever any compiler extension is used. This helps to ensure that JerryScript remains portable and can be built with any C99-compatible C compiler. Removing -Wpedantic, as any warnings of that type will already trigger an error when building with -pedantic. JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller [email protected]
1 parent c0665da commit 04ab949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ project (Jerry C ASM)
263263
endforeach()
264264
endmacro()
265265

266-
add_jerry_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations pedantic)
266+
add_jerry_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations)
267267
add_jerry_compile_flags(-Wno-stack-protector -Wno-attributes)
268268
if(CMAKE_COMPILER_IS_GNUCC)
269269
if(${USE_JERRY_LIBC})
@@ -286,7 +286,7 @@ project (Jerry C ASM)
286286
endif()
287287

288288
# C
289-
set(C_FLAGS_JERRY "-std=c99")
289+
set(C_FLAGS_JERRY "-std=c99 -pedantic")
290290

291291
# Platform-specific
292292
# MCU

0 commit comments

Comments
 (0)