ojhunt wrote:

> Looking at diagnostics in the test you add, I wonder why don't we issue them, 
> and especially the fixit, when we parse bit-field declaration. Why waiting 
> until assignment happens?

Yeah, it's super frustrating to me that we do that - I did _consider_ making 
them early but I really didn't want to simultaneously change that behavior and 
add a feature, and I thought making just preferred_type warnings early would be 
especially insane :D

GCC at least does warn on declaration, I'm not sure if there is a deliberate 
and historical reason that we delay notification, or if it is just happenstance.

I'd be onboard with making it a declaration warning in future.

https://github.com/llvm/llvm-project/pull/116785
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to