From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31549 invoked by alias); 15 Mar 2002 02:35:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31428 invoked from network); 15 Mar 2002 02:35:39 -0000 Received: from unknown (HELO igw3.watson.ibm.com) (198.81.209.18) by sources.redhat.com with SMTP; 15 Mar 2002 02:35:39 -0000 Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [9.2.112.57]) by igw3.watson.ibm.com (8.11.4/8.11.4) with ESMTP id g2F2ZTG11252; Thu, 14 Mar 2002 21:35:29 -0500 Received: from makai.watson.ibm.com (makai.watson.ibm.com [9.2.216.144]) by sp1n293en1.watson.ibm.com (8.11.4/8.11.4) with ESMTP id g2F2ZSM30956; Thu, 14 Mar 2002 21:35:28 -0500 Received: from watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX4.3/8.9.3/8.9.3/01-10-2000) with ESMTP id VAA23430; Thu, 14 Mar 2002 21:35:26 -0500 Message-Id: <200203150235.VAA23430@makai.watson.ibm.com> To: Geoff Keating cc: amodra@bigpond.net.au, rth@redhat.com, gcc-patches@gcc.gnu.org Subject: Re: f build dies with: undefined reference to `lookup_name' In-Reply-To: Message from Geoff Keating of "Thu, 14 Mar 2002 18:05:21 PST." <200203150205.g2F25Li09223@desire.geoffk.org> Date: Thu, 14 Mar 2002 18:35:00 -0000 From: David Edelsohn X-SW-Source: 2002-03/txt/msg00868.txt.bz2 >>>>> Geoff Keating writes: Geoff> Firstly, how do these work in C++? In particular, if I write Geoff> do I get foo::bar weak, ::bar weak, everything named 'bar' weak, or Geoff> something else? I believe the correct thing is to have foo::bar, Geoff> only, be weak. The current compiler seems to make Geoff> 'extern "C" bar' weak, which indicates (at least to me) that no-one Geoff> thought about this at all :-). I believe that Alan's patch will Geoff> change this behaviour in an improving direction, but I think from the Geoff> description it will pick ::bar, because ::bar's decl is visible at the Geoff> point of the pragma under the name 'bar'. Your intuition is wrong with respect to the Solaris C Compiler semantics for #pragma. #pragma weak bar makes "bar" weak. No mangling. If you want mangled bar weak, you need to explicitly state the mangled string in the pragma. If you want to define some new, incompatible semantics for #pragma, that is fine, but I'm not working on it. David