[C PATCH] Fix C error-recovery (PR c/69796, PR c/69974)
Marek Polacek
polacek@redhat.com
Mon Feb 29 11:34:00 GMT 2016
On Fri, Feb 26, 2016 at 02:45:38PM -0700, Jeff Law wrote:
> This one leaves the type incomplete, right? So ISTM it's somewhat more
> likely than the second to expose other errors later with code that doesn't
> expect the type to be incomplete (much like other code doesn't expect to
> find error_mark_node in here).
>
> The second patch at least puts a real type in there. I suspect that's less
> likely to cause problems downstream, except perhaps with diagnostics.
>
> I could argue for either. I almost asked for the latter to be tested, but
> the more I think about it, I don't like slamming in another type like that.
>
> I'll conditionally approve -- if nobody objects in 72hrs, consider the first
> patch OK for the trunk.
I'm leaning towards the first patch, i.e. the one without setting the type to
char_type_node. If it causes some issues (I hope not), we'll probably have to
add some COMPLETE_TYPE_P checks.
Marek
More information about the Gcc-patches
mailing list