From patchwork Mon May 12 21:46:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wohlferd X-Patchwork-Id: 348124 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6D30B140082 for ; Tue, 13 May 2014 07:47:00 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=sTeShUfalmY7c9vovq+51rD0dNeQDoaOTmWUylyKOv+ GVuZ3PSAEG1qVHDDGCxPXYCYhpGNQ09Ifr3WDoj3OuQJBP1IZYMW/HPzJpBt/AOy 8PFHx8nbeabCsQHkoAJUNh6sK2aJ9azs7Bxk9HTcazE0rAAJFvGnhjDNBvvBL/Tk = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=lXgPNq7jClxQ4P+34uYwA+XbfgA=; b=cBYkprNg3mNWAg3pm SzeVu7V7UBuXatE/nQRVDuvKmJr7EerNb3J1ctTNlTaoolr//HTpzQeP4PA6ncQs k5+daxyHaDTfOwCMnR1e5ULLrLRZcW+D/BNLjttz2uxnzFFpnwJX+H625KjDhGtj BrLXY97HYFNbLYwsvyeooPNYZg= Received: (qmail 27274 invoked by alias); 12 May 2014 21:46:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27252 invoked by uid 89); 12 May 2014 21:46:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: limegreensocks.com Received: from limegreensocks.com (HELO limegreensocks.com) (207.118.20.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 May 2014 21:46:51 +0000 Received: from [192.168.1.44] ([192.168.1.44]) by other via TCP with ESMTPSA; Mon, 12 May 2014 14:46:27 -0700 Message-ID: <5371412C.1010600@LimeGreenSocks.com> Date: Mon, 12 May 2014 14:46:20 -0700 From: David Wohlferd User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Gerald Pfeifer Subject: [DOC Patch] symbol rename pragmas X-IsSubscribed: yes I don't have permissions to commit this patch, but I do have a release on file with the FSF. Problem description: The existing docs make reference to the "two #pragma directives that change the name used in assembly." However, the subsequent text only describes one. It turns out, "#pragma extern_prefix" was removed in revision 185240 (March 2012), as part of "Remove obsolete Tru64 UNIX V5.1B support," but the surrounding text wasn't updated to reflect the new count. Also, while the current text makes reference to "compatibility with the Solaris system headers," the remaining pragma is (according to the existing text) "currently on all platforms." This makes referring to Solaris both superfluous and potentially confusing. ChangeLog: 2014-05-12 David Wohlferd * doc/extend.texi: Reflect current pragma count and remove "Solaris." dw Index: extend.texi =================================================================== --- extend.texi (revision 210298) +++ extend.texi (working copy) @@ -16885,11 +16885,9 @@ @node Symbol-Renaming Pragmas @subsection Symbol-Renaming Pragmas -For compatibility with the Solaris system headers, GCC -supports two @code{#pragma} directives that change the name used in -assembly for a given declaration. To get this effect -on all platforms supported by GCC, use the asm labels extension (@pxref{Asm -Labels}). +GCC supports a @code{#pragma} directive that changes the name used in +assembly for a given declaration. This effect can also be achieved +using the asm labels extension (@pxref{Asm Labels}). @table @code @item redefine_extname @var{oldname} @var{newname} @@ -16901,17 +16899,17 @@ @end table This pragma and the asm labels extension interact in a complicated -manner. Here are some corner cases you may want to be aware of. +manner. Here are some corner cases you may want to be aware of: @enumerate -@item Both pragmas silently apply only to declarations with external +@item This pragma silently applies only to declarations with external linkage. Asm labels do not have this restriction. -@item In C++, both pragmas silently apply only to declarations with +@item In C++, this pragma silently applies only to declarations with ``C'' linkage. Again, asm labels do not have this restriction. -@item If any of the three ways of changing the assembly name of a -declaration is applied to a declaration whose assembly name has +@item If either of the ways of changing the assembly name of a +declaration are applied to a declaration whose assembly name has already been determined (either by a previous use of one of these features, or because the compiler needed the assembly name in order to generate code), and the new name is different, a warning issues and