Message ID | 201105041032.50190.ebotcazou@adacore.com |
---|---|
State | New |
Headers | show |
On Wed, May 4, 2011 at 10:32 AM, Eric Botcazou <ebotcazou@adacore.com> wrote: > 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? Ok. Thanks, Richard. > > 2011-05-04 Eric Botcazou <ebotcazou@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;