[flang-commits] [clang] [flang] [flang][Driver] Forward negative sum reassociation flag (PR #217266)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Aug 19 09:46:39 PDT 2026


tblah wrote:

Thanks for the review.

> In general, we should only be forwarding the non-default option, not both. If the default changes in the frontend, the driver should be modified to accommodate this.

I wonder if my mistake here could be a reason to change the policy. It is not obvious that after changing a default value in a configuration structure, one then has to change code handling flags in an entirely different subproject. Then the failure mode when such a change is forgotten is particularly bad - in this case the negative flag was silently ignored. I think in future new options should follow the structure I use here: if any flag is given: forward the last one unconditionally, without encoding the default in two places. That will be easier to maintain.

https://github.com/llvm/llvm-project/pull/217266


More information about the flang-commits mailing list