On Nov 4, 2013, at 11:13, David Majnemer <[email protected]> wrote:
> On Mon, Nov 4, 2013 at 9:09 AM, Jordan Rose <[email protected]> wrote: > > On Nov 2, 2013, at 3:38 , David Majnemer <[email protected]> wrote: > >> + : getLangOpts().CPlusPlus >> + ? diag::ext_flexible_array_union_gnu >> + : diag::err_flexible_array_union; > > This doesn't look right. Flexible array members in unions shouldn't be an > extension in C++ if they're disallowed in C. > > My patch doesn't change this behavior. > > Given: > union x { int a; int b[]; }; > > clang in c99 or c89: > error: field has incomplete type 'int []' > > gcc in c99 or c89: > error: flexible array member in union Right, but in C++? ...actually, it seems that we do accept this in C++ (before and after your patch). Does GCC? Jordan
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
