Hi, on the heels of the discussion with Joseph, the attached patch removes the error issued by variable_size, as it appears to be totally useless at this point. FEs should be responsible for catching errors here.
Tested on x86_64-suse-linux, OK for the mainline? 2011-05-04 Eric Botcazou <ebotca...@adacore.com> * stor-layout.c (variable_size): Do not issue errors. -- Eric Botcazou
Index: stor-layout.c =================================================================== --- stor-layout.c (revision 173209) +++ stor-layout.c (working copy) @@ -152,16 +152,6 @@ variable_size (tree size) that determine sizes for variable size objects. Trust it. */ return size; - if (lang_hooks.decls.global_bindings_p ()) - { - if (TREE_CONSTANT (size)) - error ("type size can%'t be explicitly evaluated"); - else - error ("variable-size type declared outside of any function"); - - return size_one_node; - } - put_pending_size (save); return size;