Re: [PATCH] Fix type_info_expression()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 05, 2009 at 10:29:19AM -0800, Christopher Li wrote:

> Setting expr->cast_type = NULL here is not straightly necessary right?
> The expr is EXPR_SIZEOF type, the expr->cast_type is not used in
> evaluation_sizeof. Of course it doesn't hurt, I just want to get a confirm
> that I understand it correct.y.

Take a look at evaluate_type_information().  If ->cast_type is not NULL,
it won't even look at ->cast_expression.  For sizeof (struct foo){0,1} that's
fine (you end with with sizeof(struct foo), essentially), but for
sizeof(struct foo){0,1}.x that'll give you the wrong answer.

IOW, it is necessary.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux