Skip to content

Adapt to https://github.com/rocq-prover/rocq/pull/22586 - #613

Closed
proux01 wants to merge 1 commit into
AbsInt:masterfrom
proux01:rocq22586
Closed

proux01 wants to merge 1 commit into
AbsInt:masterfrom
proux01:rocq22586

Conversation

@proux01

@proux01 proux01 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@xavierleroy

Copy link
Copy Markdown
Contributor

Predictably, this triggers one warning per source file on all the supported Coq/Rocq versions

Warning: There is no flag or option with this name:
"Old IfThen Without Bool Coercion". [unknown-option,option]

So: no.

Is there a way to know where if is currently used in CompCert on types other than bool ? Obviously, sumbool, but I'd rather make sure there are no other.

Is there a (backward-compatible) way to declare coercions from these types to bool that would please the next versions of Rocq but not break the current versions?

@proux01

proux01 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Predictably, this triggers one warning per source file on all the supported Coq/Rocq versions

Warning: There is no flag or option with this name:
"Old IfThen Without Bool Coercion". [unknown-option,option]

You could silence it but I'm not sure I would recommend it. Alternatively, we could add a #[warning="-unknown-option"] Set Old IfThen Without Bool Coercion. at the beginning of each file.

Is there a way to know where if is currently used in CompCert on types other than bool ? Obviously, sumbool, but I'd rather make sure there are no other.

Compiling on Rocq 9.3 with -w +non-boolean-if indicates there isn't (at least for the target built in Rocq CI, didn't check all of them).

Is there a (backward-compatible) way to declare coercions from these types to bool that would please the next versions of Rocq but not break the current versions?

Well, that's exactly what the current PR is doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants