From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43150 invoked by alias); 1 May 2018 10:17:38 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 42428 invoked by uid 89); 1 May 2018 10:17:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,KAM_SHORT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=predictable, H*f:sk:646c8ca, H*i:sk:646c8ca X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 May 2018 10:17:35 +0000 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C10C530023C4; Tue, 1 May 2018 10:17:33 +0000 (UTC) Received: from localhost (unknown [10.33.36.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6792530012B0; Tue, 1 May 2018 10:17:33 +0000 (UTC) Date: Tue, 01 May 2018 10:17:00 -0000 From: Jonathan Wakely To: Sandra Loosemore Cc: gcc@gcc.gnu.org Subject: Re: "position independent" vs "position-independent" in documentation Message-ID: <20180501101732.GM20930@redhat.com> References: <20180430115654.GK20930@redhat.com> <646c8ca5-73bb-7566-abf3-a03c47a02140@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <646c8ca5-73bb-7566-abf3-a03c47a02140@codesourcery.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2018-05/txt/msg00005.txt.bz2 On 30/04/18 22:12 -0600, Sandra Loosemore wrote: >On 04/30/2018 05:56 AM, Jonathan Wakely wrote: >>Should we standardize on "position-independent" and add it to >>https://gcc.gnu.org/codingconventions.html#Spelling ? > >The same generic English usage rules apply here as to other compound >phrases; hyphenate when immediately before a noun, don't hyphenate in >other contexts. So "the compiler generates position-independent code" >and "the compiler generates code that is position independent" are >both correct. Or we could decide that "position-independent" should always be hyphenated as it's a commonly established adjective. I'm not arguing in favour of that, but it's how it's used in some of the docs already. >However, I don't think it's common to use "position >independent" (hyphenated or not) except as a modifier for "code", so >you could add "position-independent code" (rather than just >"position-independent") to the glossary. We have several of uses of "position independent executable" and one "position independent data" which should be hyphenated. Ignoring all the uses of "position-independent code" that already have a hyphen we're left with the following and none of them is correct! -- gcc/doc/invoke.texi-@opindex pie gcc/doc/invoke.texi:Produce a dynamically linked position independent executable on targets gcc/doc/invoke.texi-that support it. For predictable results, you must also specify the same -- gcc/doc/invoke.texi-@opindex no-pie gcc/doc/invoke.texi:Don't produce a dynamically linked position independent executable. gcc/doc/invoke.texi- -- gcc/doc/invoke.texi-@opindex static-pie gcc/doc/invoke.texi:Produce a static position independent executable on targets that support gcc/doc/invoke.texi:it. A static position independent executable is similar to a static gcc/doc/invoke.texi-executable, but can be loaded at any address without a dynamic linker. -- gcc/doc/invoke.texi-but not for the Sun 386i. Code generated for the IBM RS/6000 is always gcc/doc/invoke.texi:position-independent. gcc/doc/invoke.texi- -- gcc/doc/invoke.texi-Generate code that does not use a global pointer register. The result gcc/doc/invoke.texi:is not position independent code, and violates the IA-64 ABI@. gcc/doc/invoke.texi- -- gcc/doc/invoke.texi-@itemx -mno-shared gcc/doc/invoke.texi:Generate (do not generate) code that is fully position-independent, gcc/doc/invoke.texi-and that can therefore be linked into shared libraries. This option -- gcc/doc/invoke.texi- gcc/doc/invoke.texi:All @option{-mabicalls} code has traditionally been position-independent, gcc/doc/invoke.texi-regardless of options like @option{-fPIC} and @option{-fpic}. However, -- gcc/doc/invoke.texi-@opindex mno-pid gcc/doc/invoke.texi:Enables the generation of position independent data. When enabled any gcc/doc/invoke.texi-access to constant data is done via an offset from a base address -- gcc/doc/md.texi-Constant for arithmetic/logical operations. gcc/doc/md.texi:This is like @code{i}, except that for position independent code, gcc/doc/md.texi-no symbols / expressions needing relocations are allowed. -- gcc/doc/tm.texi-* Sections:: Dividing storage into text, data, and other sections. gcc/doc/tm.texi:* PIC:: Macros for position independent code. gcc/doc/tm.texi-* Assembler Format:: Defining how to write insns and pseudo-ops to output. -- gcc/doc/tm.texi-@section Position Independent Code gcc/doc/tm.texi:@cindex position independent code gcc/doc/tm.texi-@cindex PIC -- gcc/doc/tm.texi-A C expression that is nonzero if @var{x} is a legitimate immediate gcc/doc/tm.texi:operand on the target machine when generating position independent code. gcc/doc/tm.texi-You can assume that @var{x} satisfies @code{CONSTANT_P}, so you need not -- gcc/doc/tm.texi-(including @code{SYMBOL_REF}) can be immediate operands when generating gcc/doc/tm.texi:position independent code. gcc/doc/tm.texi-@end defmac -- gcc/doc/tm.texi.in-* Sections:: Dividing storage into text, data, and other sections. gcc/doc/tm.texi.in:* PIC:: Macros for position independent code. gcc/doc/tm.texi.in-* Assembler Format:: Defining how to write insns and pseudo-ops to output. -- gcc/doc/tm.texi.in-@section Position Independent Code gcc/doc/tm.texi.in:@cindex position independent code gcc/doc/tm.texi.in-@cindex PIC -- gcc/doc/tm.texi.in-A C expression that is nonzero if @var{x} is a legitimate immediate gcc/doc/tm.texi.in:operand on the target machine when generating position independent code. gcc/doc/tm.texi.in-You can assume that @var{x} satisfies @code{CONSTANT_P}, so you need not -- gcc/doc/tm.texi.in-(including @code{SYMBOL_REF}) can be immediate operands when generating gcc/doc/tm.texi.in:position independent code. gcc/doc/tm.texi.in-@end defmac