This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix 11614
Jason Merrill wrote:
I think it's simpler to defer handling this until we've parsed the whole
declarator. Here's a patch I haven't gotten around to testing yet:
}
else if (decl_context == FIELD)
{
+ /* The C99 flexible array extension. */
+ if (!staticp && TREE_CODE (type) == ARRAY_TYPE
+ && TYPE_DOMAIN (type) == NULL_TREE)
+ {
+ tree itype = compute_array_index_type (dname, integer_zero_node);
+ type = build_cplus_array_type (TREE_TYPE (type), itype);
+ }
+
if (type == error_mark_node)
{
/* Happens when declaring arrays of sizes which
What about
typedef int ary_t[];
struct { ary_t s; };
? I think you'll be allowing that.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk