CompCert icon indicating copy to clipboard operation
CompCert copied to clipboard

Downgrade unrecognized -W<warning> from an error to a warning

Open didickman opened this issue 7 months ago • 1 comments

Currently if an unrecognized warning is passed to CompCert, the compiler will error out. Clang will print a warning (they have a -Wunknown-warning-option) and continue compilation. I’d like to request consideration for following the same behavior as clang. This would make it easier to plug CompCert into existing build systems via “env CC=ccomp make” without having to retrofit gcc/clang build systems very much. To illustrate the difference in behavior, compare:

cc -Wunrecognized

vs.

ccomp -Wunrecognized

didickman avatar Jun 08 '25 21:06 didickman

Nice idea, thanks. Proposed implementation at #554 .

xavierleroy avatar Jun 11 '25 10:06 xavierleroy

Works nicely in my tests and helps a lot with various 3rd party build systems. Would be great to merge when ready. Thank you!

didickman avatar Jul 28 '25 23:07 didickman