From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18304 invoked by alias); 19 Apr 2011 03:43:36 -0000 Received: (qmail 18289 invoked by uid 22791); 19 Apr 2011 03:43:35 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f47.google.com (HELO mail-fx0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 03:43:19 +0000 Received: by fxm19 with SMTP id 19so3859143fxm.20 for ; Mon, 18 Apr 2011 20:43:18 -0700 (PDT) Received: by 10.223.74.83 with SMTP id t19mr261812faj.149.1303184598091; Mon, 18 Apr 2011 20:43:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.81.75 with HTTP; Mon, 18 Apr 2011 20:42:58 -0700 (PDT) In-Reply-To: <20110411033552.75423cd2.basile@starynkevitch.net> References: <20110404215335.032d7b9c.basile@starynkevitch.net> <20110408074445.4ee15190.basile@starynkevitch.net> <20110408195551.4804bbfe.basile@starynkevitch.net> <20110411033552.75423cd2.basile@starynkevitch.net> From: Laurynas Biveinis Date: Tue, 19 Apr 2011 07:13:00 -0000 Message-ID: Subject: Re: PATCH [trunk] gengtype should generate ggc_alloc macros in plugin mode on for plugin files To: Basile Starynkevitch Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01483.txt.bz2 On 04/11/2011 04:35 AM, Basile Starynkevitch wrote: > 2011-04-11 Basile Starynkevitch > > * gengtype.h (struct input_file_st): Add inpisplugin field. > (type_fileloc): New function. > * gengtype.c > (write_typed_struct_alloc_def): Add gcc_assert. > (write_typed_alloc_defns): Ditto. Don't output for plugin files. > (write_typed_alloc_defns): Don't output for plugin files. > (input_file_by_name): Clear inpisplugin field. > (main): Set inpisplugin field for plugin files. Did you test this patch that it bootstraps and that a GTY-using plugin gets the right set of definitions in the output? > @@ -4814,6 +4830,7 @@ input_file_by_name (const char* name) > f = XCNEWVAR (input_file, sizeof (input_file)+namlen+2); > f->inpbitmap = 0; > f->inpoutf = NULL; > + f->inpisplugin = 0; = false; > @@ -304,6 +305,7 @@ struct type { > } u; > }; > > + > /* The one and only TYPE_STRING. */ > extern struct type string_type; > Please drop this. OK with these changes and confirmation that the patch was tested. Thanks, Laurynas