Skip to content

Commit

Permalink
Add errors on invalid/missing function return type (#8165)
Browse files Browse the repository at this point in the history
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 #8160

Thanks to @hreintke and @mcspr for the tips.
  • Loading branch information
earlephilhower authored Jun 24, 2021
1 parent d313673 commit 90b4c6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ runtime.tools.mkdir={runtime.platform.path}/tools/mkdir.py
runtime.tools.cp={runtime.platform.path}/tools/cp.py
runtime.tools.eboot={runtime.platform.path}/bootloaders/eboot/eboot.elf

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.warning_flags=-w -Werror=return-type
compiler.warning_flags.none=-w -Werror=return-type
compiler.warning_flags.default=-Werror=return-type
compiler.warning_flags.more=-Wall -Werror=return-type
compiler.warning_flags.all=-Wall -Wextra -Werror=return-type

build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include
Expand Down
1 change: 1 addition & 0 deletions tools/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def scons_patched_match_splitext(path, suffixes=None):
"-std=gnu17",
"-Wpointer-arith",
"-Wno-implicit-function-declaration",
"-Werror=return-type",
"-Wl,-EL",
"-fno-inline-functions",
"-nostdlib"
Expand Down

0 comments on commit 90b4c6f

Please sign in to comment.