From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14114 invoked by alias); 20 Sep 2004 23:16:37 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14075 invoked from network); 20 Sep 2004 23:16:36 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.10) by sourceware.org with SMTP; 20 Sep 2004 23:16:36 -0000 Received: (qmail 7754 invoked from network); 20 Sep 2004 23:16:35 -0000 Received: from localhost (HELO ?192.168.0.105?) (mitchell@127.0.0.1) by mail.codesourcery.com with SMTP; 20 Sep 2004 23:16:35 -0000 Message-ID: <414F64CE.3080909@codesourcery.com> Date: Tue, 21 Sep 2004 03:34:00 -0000 From: Mark Mitchell Organization: CodeSourcery, LLC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 MIME-Version: 1.0 To: zack@codesourcery.com CC: gcc@gcc.gnu.org, "Joseph S. Myers" Subject: #pragma redefine_extname and local declarations Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg01206.txt.bz2 Joseph, Zack -- Given: #pragma redefine_extname f g int main () { extern int f(); f(); } we do not rename "f" to "g". Perhaps even more dramatic is the case where there is no declaration of "f" at all; because that results in an implicit local declarations we get the same behavior. This did not work in GCC 3.4 either, so I don't think it had anything to do with Zack's changes to redefine_extname in GCC 4.0. But, I'd be curious as to whether or not you think that this behavior is as desired. If you don't think this is the desired behavior, then perhaps we should be calling maybe_apply_renaming_pragma more often -- after every function declaration with external linkage in finish_decl, rather than just those with global scope. Thoughts? -- Mark Mitchell CodeSourcery, LLC (916) 791-8304 mark@codesourcery.com