On 24.09.2011, at 01:30, [email protected] wrote: > [dcl.init.list] dictates errors for narrowing conversions, which triggers > even for trivial AltiVec literals such as those inside <altivec.h>. > > Attached is a big hammer written by a manager.
I probably invalidated this patch with my recent commits. In any case, though, I don't think this is the right approach. First, C++11 specifies that narrowing conversions are errors in list-initialization, unless the source is a compile-time known value which fits into the target type. I don't see why an exception should be made for AltiVec literals. Second, if <altivec.h> triggers the error with literals, doesn't that mean the header is actually buggy? Third, there may be more places where this C++11 behavior may trigger errors in 3rd party headers, so I think the right approach is to disable the error in system headers, not for AltiVec literals. Sebastian _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
