Looks like Joern was building a cross-compiler with -Werror. In
general, doing that means that you have to build the cross-compiler with
the same version of the compiler, configured and built as a native
compiler. Most people just don't use -Werror for a cross-compiler.
Joern is an experienced gcc developer, so I would guess that he was in
fact using the same version of the compiler, and was reporting errors
that occurred nevertheless. In comment #2 you are using a different
version of the compiler.
I hope that makes sense.