On gcc that spurious warning isn't generated so the -W to suppress it
isn't recognized. It doesn't complain an unknown -Wno-blah unless it's
producing other warnings, but when it does there's always an extra line
of noise, so fix it.
I know that you are working on toysh which I'm looking forward to. In the
meantime below is a patch to improve compatibility with older/odd versions
of bash. This fixed a minor build issue I was having on MacOS (which was
using zsh in emulated bash mode) as well as an oddball embedded SDK using
a non-gnu version of bash. I believe these changes are minimal and should
be safe to apply, if not I wanted to at least get them on the mailing list
in case others ran into these issues.