diff mbox

Remove error from variable_size

Message ID 201105041032.50190.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou May 4, 2011, 8:32 a.m. UTC
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  <ebotcazou@adacore.com>

	* stor-layout.c (variable_size): Do not issue errors.

Comments

Richard Biener May 4, 2011, 9:42 a.m. UTC | #1
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
>
diff mbox

Patch

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;