Thanks. I think you’ll need a sufficiently fussy compiler (probably meaning modern?)
I don’t have a full view of which GCC versions are / aren’t fussy about it, but these two I use definitely are:
- 8.3.0 for RISC-V
- 10.2.0 for x86 used under mingw
And, needless to say, you need to get rid of the -Wno-discarded-qualifiers option.