AaronBallman wrote: > > To be honest, I'm not entirely convinced of the value of having these > > warnings in the first place. RenderFloatingPointOptions is already pretty > > gnarly and hard to follow, and trying to capture what gcc would have done > > based on its priority system so we can warn if we got it wrong with our > > last-flag-wins system just makes it more so. > > I agree that the implementation would be quite complex. I'm also unsure if > it's worth implementing, so I'd like to hear other people's opinions. > > After checking the GCC master branch, it seems that the priority of complex > number options changed with this > [patch](https://github.com/gcc-mirror/gcc/commit/e543eaa671d40868575385360d13ef37d87fb2a0) > three months ago. As far as I can tell, at least the behavior when > `-fcx-fortran-rules -fcx-limited-range` are specified has changed, and it now > behaves as "last-flag-wins," unlike before. On the other hand, when > `-fcx-fortran-rules -ffast-math -fno-fast-math` are specified, the behavior > remains that the first specified `-fcx-fortran-rules` is enabled. If we were > to accurately warn about incompatibility with GCC, we might need a message > like "Incompatible with GCC version xxx." I think this is too complex, so it > might be better to only modify the warning message regarding overriding, > without adding warnings about GCC incompatibility.
Oof, yeah, that the behavior is still changing in GCC is a good reason to not warn about GCC incompatibility. That would be a mess to maintain. :-( https://github.com/llvm/llvm-project/pull/149028 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits