[libcxx] r254050 - Silence a -Wmissing-braces warning in the tests; mbstate_t is defined differently on different C libraries.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 08:21:50 PST 2015


Is {} not portable in some way?
On Nov 25, 2015 5:58 AM, "Joerg Sonnenberger via cfe-commits" <
cfe-commits at lists.llvm.org> wrote:

> On Tue, Nov 24, 2015 at 05:38:23PM -0800, David Blaikie via cfe-commits
> wrote:
> > Could this initialization just be written as "mbstate_t mb = {}" & avoid
> > the warning entirely (I'm not entirely sure what the warning was, but I
> > imagine that'd avoid it)
>
> Or even better, just use the portable memset(&mb, 0, sizeof(mb)).
>
> Joerg
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151125/0c8c7d69/attachment.html>


More information about the cfe-commits mailing list