This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [objc] Fix PR18862
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Alexander Malmberg <alexander at malmberg dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Jan 2005 10:08:09 -0800
- Subject: Re: [objc] Fix PR18862
- References: <41F7AFFF.2060805@malmberg.org>
Alexander Malmberg <alexander@malmberg.org> writes:
> This PR is about a crash when trying to use -Wselector with the GNU runtime.
...
> warning ("%Jcreating selector for nonexistent method %qE",
> TREE_PURPOSE (chain), TREE_VALUE (chain));
>
> ... which uses the location of TREE_PURPOSE (chain) unconditionally,
> hence the crash. (When using the GNU runtime, TREE_PURPOSE (chain) is
> used for the 'type' of the selector, and it's NULL if the type is
> unknown, which I believe is always the case for the selectors we'll
> warn about here; not sure if there's a sensible location on the type
> in other cases.)
Good catch. (Grumble mumble overloaded tree pointers grumble.)
> objc/ChangeLog:
> 2005-01-26 Alexander Malmberg <alexander@malmberg.org>
>
> PR objc/18862
> * objc-act.c (build_selector_translation_table): Use
> input_location in the diagnostic for the GNU runtime or if
> TREE_PURPOSE (chain) is NULL.
>
> testsuite/ChangeLog:
> 2005-01-26 Alexander Malmberg <alexander@malmberg.org>
>
> PR objc/18862
> * objc.dg/selector-2.m: New test.
This is OK.
zw