No, it won't compile. Not even kernel v4.8 can be compiled with gcc v11+.
I don't know what the issue with Linux is, but most projects should compile. I've compiled many old projects. You do need to tweak some flags at times because defaults change.