From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11789 invoked by alias); 13 Oct 2009 12:30:48 -0000 Received: (qmail 11780 invoked by uid 22791); 13 Oct 2009 12:30:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Oct 2009 12:30:43 +0000 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxgWW-0004bm-Cm for gcc-patches@gcc.gnu.org; Tue, 13 Oct 2009 08:30:41 -0400 Received: (qmail 27440 invoked from network); 13 Oct 2009 12:30:36 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Oct 2009 12:30:36 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1MxgWR-0004iN-9a; Tue, 13 Oct 2009 12:30:35 +0000 Date: Tue, 13 Oct 2009 12:32:00 -0000 From: "Joseph S. Myers" To: Nick Clifton cc: gcc-patches@gcc.gnu.org Subject: Re: RFA: Adding @minus{} to gcc documentation In-Reply-To: <4AD42A70.2040701@redhat.com> Message-ID: References: <4AD42A70.2040701@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00825.txt.bz2 On Tue, 13 Oct 2009, Nick Clifton wrote: > Hi Joseph. > > > All of these should use @minus{} for the minus sign. > > Ah - thanks for the pointer. In which case, would you care to review the > attached patch which replaces the '-' character with @minus{} in the current > documentation files, in places where it is being used as a minus sign ? @minus{} should be used where what is being represented is a number, or subtraction in English text, not when it is a piece of C source code (C uses the ASCII HYPHEN-MINUS). (Similarly, @dots{} represents ellipsis, and it's incorrect to use it for the literal "..." token of C.) Thus (presuming the results look right in the output of "make dvi" or "make pdf" without breaking "make info" and "make html"): > -This format can represent normalized values in the range of @math{2^{-14}} to 65504. > +This format can represent normalized values in the range of @math{2^{@minus{}14}} to 65504. OK. > -values in the range of @math{2^{-14}} to 131008. > +values in the range of @math{2^{@minus{}14}} to 131008. OK. > -possible through @code{extern char [(condition) ? 1 : -1];} tricks. > +possible through @code{extern char [(condition) ? 1 : @minus{}1];} tricks. Not OK. > -returns @code{(size_t) -1} for @var{type} 0 or 1 and @code{(size_t) 0} > +returns @code{(size_t) @minus{}1} for @var{type} 0 or 1 and @code{(size_t) 0} Not OK. > -return @code{(size_t) -1} for @var{type} 0 or 1 and @code{(size_t) 0} > +return @code{(size_t) @minus{}1} for @var{type} 0 or 1 and @code{(size_t) 0} Not OK. > -argument points to or @code{(size_t) -1} if the size is not known. > +argument points to or @code{(size_t) @minus{}1} if the size is not known. Not OK. > -like @code{memcpy} if the last argument is @code{(size_t) -1} or if > +like @code{memcpy} if the last argument is @code{(size_t) @minus{}1} or if Not OK. > -though, if @var{os} is @code{(size_t) -1}, the built-in functions are > +though, if @var{os} is @code{(size_t) @minus{}1}, the built-in functions are Not OK. > -@code{(size_t) -1}. > +@code{(size_t) @minus{}1}. Not OK. > -@var{x}, storing the value -32768 if the result overflows. > +@var{x}, storing the value @minus{}32768 if the result overflows. OK. > -numbers 0 through @code{FIRST_PSEUDO_REGISTER-1}; thus, the first > +numbers 0 through @code{FIRST_PSEUDO_REGISTER @minus{} 1}; thus, the first Not OK. > -if the array holds @code{-1}. > +if the array holds @code{@minus{}1}. Not OK. > -log2(@var{VS})-1 bits of @var{addr} will be considered. > +log2(@var{VS}) @minus{} 1 bits of @var{addr} will be considered. OK. > -or -1, if it doesn't. @var{request} describes the type of requested > +or @minus{}1, if it doesn't. @var{request} describes the type of requested OK. > -@samp{REAL_VALUES_EQUAL (-0.0, 0.0)} is true, and > +@samp{REAL_VALUES_EQUAL (@minus{}0.0, 0.0)} is true, and Not OK. > -like @code{unsigned ui = -1}; and conversions to smaller types, like > +like @code{unsigned ui = @minus{}1}; and conversions to smaller types, like Not OK. > -((int) x)} and @code{ui = (unsigned) -1}, or if the value is not > +((int) x)} and @code{ui = (unsigned) @minus{}1}, or if the value is not Not OK. > -and has length @code{((pc[-3]) & 0xff000000)}. > +and has length @code{((pc[@minus{}3]) & 0xff000000)}. Not OK. > -Integer constant in the range -6 @dots{} 5. > +Integer constant in the range @minus{}6 @dots{} 5. OK. > -Constant that is one of -1, 4, -4, 7, 8, 12, 16, 20, 32, 48 > +Constant that is one of @minus{}1, 4, @minus{}4, 7, 8, 12, 16, 20, 32, 48 OK. > -Signed 16 bit integer (in the range -32768 to 32767) > +Signed 16 bit integer (in the range @minus{}32768 to 32767) OK. > -Signed 7 bit integer (in the range -64 to 63) > +Signed 7 bit integer (in the range @minus{}64 to 63) OK. > -Signed 4 bit integer (in the range -8 to 7) > +Signed 4 bit integer (in the range @minus{}8 to 7) OK. > -Signed 3 bit integer (in the range -3 to 4) > +Signed 3 bit integer (in the range @minus{}3 to 4) OK. > --8 @dots{} 7 > +@minus{}8 @dots{} 7 OK. > --128 @dots{} 127 > +@minus{}128 @dots{} 127 OK. > --32768 @dots{} 32767 > +@minus{}32768 @dots{} 32767 OK. > --8 @dots{} -1 or 1 @dots{} 8 > +@minus{}8 @dots{} @minus{}1 or 1 @dots{} 8 OK. > --16 @dots{} -1 or 1 @dots{} 16 > +@minus{}16 @dots{} @minus{}1 or 1 @dots{} 16 OK. > --32 @dots{} -1 or 1 @dots{} 32 > +@minus{}32 @dots{} @minus{}1 or 1 @dots{} 32 OK. > --65536 @dots{} -1 > +@minus{}65536 @dots{} @minus{}1 OK. > -A constant in the range -65535 to -1 (inclusive). > +A constant in the range @minus{}65535 to @minus{}1 (inclusive). OK. > -A constant in the range of 0 to -255. > +A constant in the range of 0 to @minus{}255. OK. > -A constant in the range [-64, 63] for shift/rotate instructions. > +A constant in the range [@minus{}64, 63] for shift/rotate instructions. OK. > -@item (-524288..524287) > +@item (@minus{}524288..524287) OK. > -Expected size, when unknown, is set to @code{(const_int -1)}. > +Expected size, when unknown, is set to @code{(const_int @minus{}1)}. Not OK (I think textual RTL, in @code, should be considered like C to use HYPHEN-MINUS). > -Expected size, when unknown, is set to @code{(const_int -1)}. > +Expected size, when unknown, is set to @code{(const_int @minus{}1)}. Not OK. -- Joseph S. Myers joseph@codesourcery.com