From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3824 invoked by alias); 28 Apr 2010 12:47:04 -0000 Received: (qmail 3811 invoked by uid 22791); 28 Apr 2010 12:47:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Apr 2010 12:46:58 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id o3SCktde005164 for ; Wed, 28 Apr 2010 05:46:55 -0700 Received: from vws12 (vws12.prod.google.com [10.241.21.140]) by wpaz17.hot.corp.google.com with ESMTP id o3SCkrVu025302 for ; Wed, 28 Apr 2010 05:46:54 -0700 Received: by vws12 with SMTP id 12so671041vws.0 for ; Wed, 28 Apr 2010 05:46:53 -0700 (PDT) Received: by 10.220.128.37 with SMTP id i37mr5240219vcs.170.1272458813646; Wed, 28 Apr 2010 05:46:53 -0700 (PDT) Received: from frodo.local (216-239-44-65.google.com [216.239.44.65]) by mx.google.com with ESMTPS id b7sm27851194vcx.2.2010.04.28.05.46.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Apr 2010 05:46:52 -0700 (PDT) Message-ID: <4BD82E39.4070802@google.com> Date: Wed, 28 Apr 2010 14:34:00 -0000 From: Diego Novillo User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Brian Hackett CC: Richard Guenther , Richard Guenther , gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: plugin event for C/C++ declarations References: <407016140912221000o1c69d392x68607f8f529eaa7d@mail.gmail.com> <4BD70167.6070905@google.com> <4BD709F8.7090201@google.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true 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: 2010-04/txt/msg01743.txt.bz2 On 4/27/10 15:43 , Brian Hackett wrote: > Hmm, I don't see a way for this to avoid using a global variable, I wanted to avoid introducing a *new* one actually. But I had forgotten that we don't already have one for -fplugin. > there's no state saved for whether a plugin has been added that is not > internal to plugin.c. The patch below (seems to build, need to test > regr) adds a flag_plugin_added; alternatively plugin_name_args_tab > could be extern'ed in plugin.h but there's no reason for anything > outside plugin.c to access this structure's internals. OK with the changes Richard suggested for the ChangeLog entry and: > +/* True iff at least one plugin has been added. */ > +extern bool flag_plugin_added; Move the declaration inside invoke_plugin_callbacks? This will at least prevent other functions outside plugin.c from trying to access it. Diego.