This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Robustify TYPE_LANG_SPECIFIC condition check
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 09 Dec 2004 21:02:14 -0800
- Subject: Re: PATCH: Robustify TYPE_LANG_SPECIFIC condition check
- References: <DB23F2EE-4A57-11D9-BBAA-000D9330C50E@apple.com>
Ziemowit Laski <zlaski@apple.com> writes:
> This is a consequence of ObjC now using TYPE_LANG_SPECIFIC to store its
> own information. Turns out that lookup_field() assumes that
> TYPE_LANG_SPECIFIC
> assumes will always have its 's' field initialized, which is not true
> for ObjC structs.
>
> OK for mainline?
This is OK.
> --Zem
>
> [gcc/ChangeLog]
> 2004-12-09 Ziemowit Laski <zlaski@apple.com>
>
> * c-typeck.c (lookup_field): Check if a TYPE_LANG_SPECIFIC
> pointer field is set before dereferencing it.