From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24799 invoked by alias); 10 Apr 2002 23:23:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24792 invoked from network); 10 Apr 2002 23:23:37 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 10 Apr 2002 23:23:37 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A36D43F3D; Wed, 10 Apr 2002 19:23:40 -0400 (EDT) Message-ID: <3CB4C97C.2010001@cygnus.com> Date: Wed, 10 Apr 2002 16:23:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: non-mulit-arch compiles probs References: <3CB45339.2010007@cygnus.com> <3CB4C50D.677DCC52@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00414.txt.bz2 > Andrew Cagney wrote: > >> >> FYI, >> >> The file std-regs.c doesn't compile with -Werror on non-multi-arch >> targets. They all dropped like flies. >> >> Adding to the fun, I've found an entry for the ``how did this ever >> compile'' category: >> >> exec.c:print_section_info (struct target_ops *t, bfd *abfd) >> maint.c:print_section_info (const char *name, flagword flags, >> >> (one is static, the other has a .h declaration). > > > Doesn't the static one override the global one? Yes, you can have both a static and a global function with the same name. I think it is asking for trouble though. As with my case, when the global function's declaration becomes visible in the file with the static declaration (new #include) the compile will barf (the functions had different signatures). enjoy, Andrew