Discussion:
[Toybox] 3354319e3d3e0b4f5f113d65fa508608f278092c
enh
2017-04-11 20:04:00 UTC
Permalink
instead of
https://github.com/landley/toybox/commit/3354319e3d3e0b4f5f113d65fa508608f278092c
are you sure you don't just want to add this to your makefile:

-Wno-string-plus-int

i added that to the Android build file a long time ago since you're keen on
this idiom...

-e
Rob Landley
2017-04-16 21:29:10 UTC
Permalink
Post by enh
instead of
https://github.com/landley/toybox/commit/3354319e3d3e0b4f5f113d65fa508608f278092c
-Wno-string-plus-int
i added that to the Android build file a long time ago since you're keen
on this idiom...
Wow. The gcc 4.8.4 in ubuntu 14.04.3 is _interestingly_ broken:

cc -Wall -Wundef -Wno-char-subscripts
-Werror=implicit-function-declaration -Wno-string-plus-int
-funsigned-char -I . -Os -ffunction-sections -fdata-sections
-fno-asynchronous-unwind-tables -fno-strict-aliasing
-DTOYBOX_VERSION="0.7.3-34-g060a9f3380c5" -c lib/help.c -o
generated/obj/lib_help.o
cc -Wall -Wundef -Wno-char-subscripts
-Werror=implicit-function-declaration -Wno-string-plus-int
-funsigned-char -I . -Os -ffunction-sections -fdata-sections
-fno-asynchronous-unwind-tables -fno-strict-aliasing
-DTOYBOX_VERSION="0.7.3-34-g060a9f3380c5" -c main.c -o generated/obj/main.o
cc -Wall -Wundef -Wno-char-subscripts
-Werror=implicit-function-declaration -Wno-string-plus-int
-funsigned-char -I . -Os -ffunction-sections -fdata-sections
-fno-asynchronous-unwind-tables -fno-strict-aliasing
-DTOYBOX_VERSION="0.7.3-34-g060a9f3380c5" -c toys/posix/ls.c -o
generated/obj/ls.o
toys/posix/ls.c: In function 'listfiles':
toys/posix/ls.c:416:9: warning: format not a string literal and no
format arguments [-Wformat-security]
printf(" "+mm);
^
toys/posix/ls.c: At top level:
cc1: warning: unrecognized command line option "-Wno-string-plus-int"
[enabled by default]

It happily accepts -Wno-string-plus-int, then if it hits the warning it
emits it and then _retroactively_ complains that it doesn't know what
the command line option to suppress it means.

The <strike>Aristocrats</strike> Free Software Foundation!

Rob

Loading...