On 04/11/2017 03:13 PM, Alexandre Oliva wrote:
On Apr 10, 2017, Jeff Law <l...@redhat.com> wrote:

On 03/21/2017 05:32 PM, Alexandre Oliva wrote:
* libcp1plugin.cc (plugin_build_decl): Propagate typedef name to
anonymous aggregate target type.
Can you put some kind of pointer in the code you copied from cp/decl.c
so that there's some chance anyone changing that code would at least
go look at the libcpplugin.cc copy and try to DTRT.

Well, if we're actually touching the g++ code, I'd much rather refactor
it a bit and export this chunk of code for libcc1 to use without
copying.  How's this instead?  (testing)


[libcp1] handle anon aggregates linkage-named by typedefs

Arrange for the first typedef to an anonymous type in the same context
to be used as the linkage name for the type.

for  gcc/cp/ChangeLog

        * decl.c (name_unnamed_type): Split out of...
        (grokdeclarator): ... this.
        * decl.h (name_unnamed_type): Declare.

for  libcc1/ChangeLog

        * libcp1plugin.cc (plugin_build_decl): Call name_unnamed_type.
OK.

jeff

Reply via email to