This is the mail archive of the
mailing list for the GCC project.
Re: [C PATCH] Clamp down "incomplete type" error (PR c/63543)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Oct 2014 19:23:26 +0200
- Subject: Re: [C PATCH] Clamp down "incomplete type" error (PR c/63543)
- Authentication-results: sourceware.org; auth=none
- References: <20141015172244 dot GE10501 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1410152143150 dot 11645 at digraph dot polyomino dot org dot uk> <543EEBA4 dot 2030907 at redhat dot com> <20141015215259 dot GC10376 at tucnak dot redhat dot com>
On Wed, Oct 15, 2014 at 11:52:59PM +0200, Jakub Jelinek wrote:
> On Wed, Oct 15, 2014 at 03:48:20PM -0600, Jeff Law wrote:
> > Isn't slamming error_mark_node well established at this point? I fact I
> > recall seeing it documented to be used in this kind of way to prevent future
> > errors.
> I think in this case it is way too risky to put error_mark_node there,
> it will affect also all the places where the object with that type isn't
> If there are spare bits on the type, either using one for this error, or
> to represent some error has been diagnosed for the particular type and
> hash table lookup could be used to look up which exactly, or just hash table
> without any bit...
I thought sticking error_mark_node into the type would be feasible
here, because we do it elsewhere too, and the program is invalid
Well - maybe the new patch is better.