https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102145
Rimvydas (RJ) <rimvydas.jas at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rimvydas.jas at gmail dot com --- Comment #4 from Rimvydas (RJ) <rimvydas.jas at gmail dot com> --- (In reply to ripero84 from comment #0) > In the presence of -pedantic, -fallow-argument-mismatch fails to degrade the > mismatch errors to warnings: > > This is: > - undocumented; and > - unexpected, since it effectively means that by adding -pedantic to a > compilation line that already contains -fallow-argument-mismatch, mismatch > warnings are upgraded to errors, despite -pedantic is only supposed to issue > warnings. This made many projects just simply remove -pedantic[-errors] and -Werror[=foo] from building recipes for newer gfortran versions until behavior changes. Any software that includes hdf.inc, netcdf.inc and especially mpif.h is simply not suitable for checking if actually deprecated and/or deleted features are being used in the user when code compilation aborts on first file with argument mismatch even for -std=legacy -pedantic. Without going into unrelated and even mildly disheartening long paragraphs without useful information, most of this started with removal of -Wargument-mismatch option. While it is understandable why it was done like this from compiler developer perspective, it is a major breakage for what user expects or expected previously from the compiler. The -std=legacy already implies -fallow-argument-mismatch, so why even warn about mismatches by default? Same for -std=gnu -fallow-argument-mismatch, user already supplied option to specifically enable the extension, because code needs it. It used to be that -pedantic (or -Wpedantic) was safe to use to check if some unintended deleted language features are present in the codebase. Now with -pedantic acting like -pedantic-errors and without any support to -Wno-0 or -Wno-error=0 (yes, anything opt==0 "enabled by default") it is very complicated. If you have checking scripts or tools that rely on previous behavior and you are willing to compile separate gfortran version, you could use my old WIP that almost work as expected or at least provide a way to -Wno-error=pedantic on these. Helped me a lot until we phased out those tools.