1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Add errors on invalid/missing function return type (#8165)

GCC 10.x seems to have a knack for crashing when a function which is declared
to return a value does not.  Add a warning, present on all builds, when this
is the case.  For more info see https://github.com/esp8266/Arduino/discussions/8160

Thanks to @hreintke and @mcspr for the tips.
This commit is contained in:
Earle F. Philhower, III 2021-06-24 12:44:57 -07:00 committed by GitHub
parent d3136738ad
commit 90b4c6f299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -21,11 +21,11 @@ runtime.tools.mkdir={runtime.platform.path}/tools/mkdir.py
runtime.tools.cp={runtime.platform.path}/tools/cp.py runtime.tools.cp={runtime.platform.path}/tools/cp.py
runtime.tools.eboot={runtime.platform.path}/bootloaders/eboot/eboot.elf runtime.tools.eboot={runtime.platform.path}/bootloaders/eboot/eboot.elf
compiler.warning_flags=-w compiler.warning_flags=-w -Werror=return-type
compiler.warning_flags.none=-w compiler.warning_flags.none=-w -Werror=return-type
compiler.warning_flags.default= compiler.warning_flags.default=-Werror=return-type
compiler.warning_flags.more=-Wall compiler.warning_flags.more=-Wall -Werror=return-type
compiler.warning_flags.all=-Wall -Wextra compiler.warning_flags.all=-Wall -Wextra -Werror=return-type
build.lwip_lib=-llwip_gcc build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include build.lwip_include=lwip/include

View File

@ -62,6 +62,7 @@ env.Append(
"-std=gnu17", "-std=gnu17",
"-Wpointer-arith", "-Wpointer-arith",
"-Wno-implicit-function-declaration", "-Wno-implicit-function-declaration",
"-Werror=return-type",
"-Wl,-EL", "-Wl,-EL",
"-fno-inline-functions", "-fno-inline-functions",
"-nostdlib" "-nostdlib"