Closed najamelan closed 6 years ago
Thanks a lot! Unfortunately, this seems to break older versions of gcc (e.g. 4.8.4 reports gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’
), as they do not understand this flag. Would it be possible to make it conditional?
This time the tests pass, note that the gcc version check is not done the same way then elsewhere in the build script, but this seemed cleaner and more readable to me. I found the technique on: https://stackoverflow.com/questions/5188267/checking-the-gcc-version-in-a-makefile
Ah, is this only needed for buildrump.sh? Then it should eventually be added there instead (and it might already be fixed in netbsd-src, but we're currently using an older checkout).
In any case, I'll happily merge this for now.
GCC7 comes with a new warning "implicit-fallthrough" which will prevent building the netbsd-src.
For more information: https://dzone.com/articles/implicit-fallthrough-in-gcc-7
I don't know if this is the best way to deal with it, but it works ;-)