This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: [patch] Fix PR c/27718: ICE with sizeof of incomplete type
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: Bernd Schmidt <bernds_cb1 at t-online dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 May 2006 18:31:32 +0200 (CEST)
- Subject: Re: PING: [patch] Fix PR c/27718: ICE with sizeof of incomplete type
- References: <tkrat.5e0872fb4ec9ae65@igpm.rwth-aachen.de> <447B1EA5.8020405@t-online.de>
On 29 May, Bernd Schmidt wrote:
> Volker Reichelt wrote:
>> Could somebody please have a look at the following fix for the C frontend:
>> http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01141.html
>
> This looks ok except for the formatting of the ?: operator.
Should I write it like this?
===================================================================
--- gcc/gcc/c-typeck.c 2006-05-08 22:57:52 +0200
+++ gcc/gcc/c-typeck.c 2006-05-22 00:49:44 +0200
@@ -2133,7 +2133,8 @@ c_expr_sizeof_type (struct c_type_name *
type = groktypename (t);
ret.value = c_sizeof (type);
ret.original_code = ERROR_MARK;
- pop_maybe_used (C_TYPE_VARIABLE_SIZE (type));
+ pop_maybe_used (type != error_mark_node
+ ? C_TYPE_VARIABLE_SIZE (type) : false);
return ret;
}
===================================================================
> :REVIEWURL <http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01141.html>:
>
>
> Bernd
Regards,
Volker