[clang] [C23] Accept an _Atomic underlying type (PR #147802)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 10 07:24:22 PDT 2025


erichkeane wrote:

> > > avior due to the silent stripping. Given that an atomic type is not the same as its underlying type (in terms of ABI or semantics) I think we should diagnose the behavior with at least a warning. I could even be convinced it should be a warning which defaults to an error because this is just weird.
> > 
> > 
> > Yeah, I 100% agree with that. Warn-as-error is reasonable here IMO (as are ANY qualifiers?, but more so for atomic)
> 
> Would you like me to diagnose any qualifier? And turn it into warning-as-error?

I thought about this more... I think a warning for 'qualifier ignored' for 'normal' qualifier is sensible, but not as error.

I can make a pretty strong case (as you did above) for the _Atomic who-what-zit to be a default warning-as- error.

As far as what I want... feel free to land as-is, or if you feel motivated, do the rest.

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


More information about the cfe-commits mailing list