This is the mail archive of the
mailing list for the GCC project.
Re: [C frontend] Fix construction of TYPE_STUB_DECL
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 May 2015 16:26:14 -0500
- Subject: Re: [C frontend] Fix construction of TYPE_STUB_DECL
- Authentication-results: sourceware.org; auth=none
- References: <20150510173354 dot GB80167 at kam dot mff dot cuni dot cz>
On 05/10/2015 12:33 PM, Jan Hubicka wrote:
This is properly honored by C++ FE but other FEs are bit random, which in turn
confuses type_in_anonymous_namespace_p predicate that leads to flase poistives
on type mismatch warnings. I used to be able to get around by checking only
C++ types at LTO time, but with type checking in lto-symtab I can not, because
I do want to compare type compatibility cross translation units and cross languages
and we have no reliable way to say what type originated as C++ and what did not.
I think we should, as only C++ declarations are subject to the ODR. C
has different (structural) compatibility rules, and I think they should
apply when comparing C and C++ types.
Since C struct names have no linkage, I don't think it's right to set
TREE_PUBLIC on them.