From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11353 invoked by alias); 10 Apr 2011 18:51:56 -0000 Received: (qmail 11343 invoked by uid 22791); 10 Apr 2011 18:51:55 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp-100-sunday.noc.nerim.net (HELO mallaury.nerim.net) (62.4.17.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Apr 2011 18:51:51 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by mallaury.nerim.net (Postfix) with ESMTPS id D6B76153419; Sun, 10 Apr 2011 20:51:50 +0200 (CEST) Received: from glinka.lesours ([192.168.0.1]) by hector.lesours with smtp (Exim 4.74) (envelope-from ) id 1Q8zjS-0005gp-7P; Sun, 10 Apr 2011 20:51:34 +0200 Date: Sun, 10 Apr 2011 18:51:00 -0000 From: Basile Starynkevitch To: Laurynas Biveinis Cc: gcc-patches@gcc.gnu.org Subject: Re: PATCH [trunk] gengtype should generate ggc_alloc macros in plugin mode. Message-Id: <20110410205024.a6c936c2.basile@starynkevitch.net> In-Reply-To: References: <20110404215335.032d7b9c.basile@starynkevitch.net> <20110408074445.4ee15190.basile@starynkevitch.net> <20110408195551.4804bbfe.basile@starynkevitch.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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/msg00714.txt.bz2 On Sun, 10 Apr 2011 21:47:05 +0300 Laurynas Biveinis wrote: > 2011/4/8 Basile Starynkevitch : > > Actually, the above committed patch is better than nothing, but not > > perfect. It happens to generate ggc_alloc macros for things which are > > not defined in the plugin (however, this is not a big deal in practice, > > since it generates some macros in common with those inside > > gtype-desc.h). > > I think it is rather hard to solve it properly, i.e. only output what > is actually used. But, as you said, it is benign, so I think we'll > have to keep ignoring it for now. A possible idea (I did not test it, and did not even thought a lot about it), could be to add a boolean in output_file-s which tell if they are plugin files or not. If that is doable, generating ggc_alloc only for plugin related files is just testing that boolean in the line location of structure descriptors. Cheers -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***