ahatanak added inline comments.

================
Comment at: test/Sema/enum-attr.c:27
+
+enum __attribute__((enum_extensibility(arg1))) EnumInvalidArg { // 
expected-warning{{'enum_extensibility' attribute argument not supported: 
'arg1'}}
+  G
----------------
aaron.ballman wrote:
> ahatanak wrote:
> > arphaman wrote:
> > > Should this be an error instead?
> > Yes, I agree.
> I'm not opposed to it, but we do treat it as a warning for every other 
> attribute (and just ignore the attribute), FWIW.
Do you know the reason we treat wrong attribute arguments as a warning in other 
cases rather than an error?

I'm guessing a warning is preferred because in most cases dropping an attribute 
doesn't affect correctness (it doesn't cause miscompiles).


https://reviews.llvm.org/D30766



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to