public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: RFA: Adding @minus{} to gcc documentation
Date: Tue, 13 Oct 2009 08:44:00 -0000	[thread overview]
Message-ID: <4AD42A70.2040701@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0910081403530.9896@digraph.polyomino.org.uk>

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

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 ?

Cheers
   Nick

gcc/ChangeLog
2009-10-13  Nick Clifton  <nickc@redhat.com>

	* gcc/doc/extended.texi: Replace the dash character with
	@minus{} in situations where it is being used as a minus
	symbol.
	* gcc/doc/tm.texi: Likewise.
	* gcc/doc/invoke.texi: Likewise.
	* gcc/doc/md.texi: Likewise.





[-- Attachment #2: minus.patch --]
[-- Type: text/x-diff, Size: 12051 bytes --]

Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi	(revision 152662)
+++ gcc/doc/extend.texi	(working copy)
@@ -935,7 +935,7 @@
 use it consistently in your program.
 
 Specifying @option{-mfp16-format=ieee} selects the IEEE 754-2008 format.
-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.
 There are 11 bits of significand precision, approximately 3
 decimal digits.
 
@@ -943,7 +943,7 @@
 alternative format.  This representation is similar to the IEEE
 format, but does not support infinities or NaNs.  Instead, the range
 of exponents is extended, so that this format can represent normalized
-values in the range of @math{2^{-14}} to 131008.
+values in the range of @math{2^{@minus{}14}} to 131008.
 
 The @code{__fp16} type is a storage format only.  For purposes
 of arithmetic and other operations, @code{__fp16} values in C or C++
@@ -2039,7 +2039,7 @@
 which will include @var{message} will be diagnosed.  This is useful
 for compile time checking, especially together with @code{__builtin_constant_p}
 and inline functions where checking the inline function arguments is not
-possible through @code{extern char [(condition) ? 1 : -1];} tricks.
+possible through @code{extern char [(condition) ? 1 : @minus{}1];} tricks.
 While it is possible to leave the function undefined and thus invoke
 a link failure, when using this attribute the problem will be diagnosed
 earlier and with exact location of the call even in presence of inline
@@ -6278,13 +6285,13 @@
 @var{ptr} to the end of the object @var{ptr} pointer points to
 (if known at compile time).  @code{__builtin_object_size} never evaluates
 its arguments for side-effects.  If there are any side-effects in them, it
-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}
 for @var{type} 2 or 3.  If there are multiple objects @var{ptr} can
 point to and all of them are known at compile time, the returned number
 is the maximum of remaining byte counts in those objects if @var{type} & 2 is
 0 and minimum if nonzero.  If it is not possible to determine which objects
 @var{ptr} points to at compile time, @code{__builtin_object_size} should
-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}
 for @var{type} 2 or 3.
 
 @var{type} is an integer constant from 0 to 3.  If the least significant
@@ -6313,10 +6320,10 @@
 functions, e.g., for @code{memcpy} @code{__builtin___memcpy_chk}
 built-in is provided.  This built-in has an additional last argument,
 which is the number of bytes remaining in object the @var{dest}
-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.
 
 The built-in functions are optimized into the normal string functions
-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
 it is known at compile time that the destination object will not
 be overflown.  If the compiler can determine at compile time the
 object will be always overflown, it issues a warning.
@@ -6369,10 +6376,10 @@
 
 The @var{os} argument is the object size @var{s} points to, like in the
 other built-in functions.  There is a small difference in the behavior
-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
 optimized into the non-checking functions only if @var{flag} is 0, otherwise
 the checking function is called with @var{os} argument set to
-@code{(size_t) -1}.
+@code{(size_t) @minus{}1}.
 
 In addition to this, there are checking built-in functions
 @code{__builtin___printf_chk}, @code{__builtin___vprintf_chk},
@@ -9732,7 +9740,7 @@
 
 @item int __builtin_subs (int @var{x}, int @var{y})
 Saturating subtraction.  Return the result of subtracting @var{y} from
-@var{x}, storing the value -32768 if the result overflows.
+@var{x}, storing the value @minus{}32768 if the result overflows.
 
 @item void __builtin_halt (void)
 Halt.  The processor will stop execution.  This built-in is useful for
Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi	(revision 152662)
+++ gcc/doc/tm.texi	(working copy)
@@ -1918,7 +1918,7 @@
 
 @defmac FIRST_PSEUDO_REGISTER
 Number of hardware registers known to the compiler.  They receive
-numbers 0 through @code{FIRST_PSEUDO_REGISTER-1}; thus, the first
+numbers 0 through @code{FIRST_PSEUDO_REGISTER @minus{} 1}; thus, the first
 pseudo register's number really is assigned the number
 @code{FIRST_PSEUDO_REGISTER}.
 @end defmac
@@ -5400,7 +5399,7 @@
 must be rejected.  For non-hard registers, the strict variant should look
 up the @code{reg_renumber} array; it should then proceed using the hard
 register number in the array, or treat the pseudo as a memory reference
-if the array holds @code{-1}.
+if the array holds @code{@minus{}1}.
 
 The non-strict variant is used in other passes.  It must be defined to
 accept all pseudo-registers in every context where some kind of
@@ -5628,7 +5627,7 @@
 described above.
 If this hook is not defined, then @var{addr} will be used as
 the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low
-log2(@var{VS})-1 bits of @var{addr} will be considered.
+log2(@var{VS}) @minus{} 1 bits of @var{addr} will be considered.
 @end deftypefn
 
 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN (tree @var{x})
@@ -6610,7 +6618,7 @@
 The hook is used to check if the pattern of @var{insn} has a speculative
 version and, in case of successful check, to generate that speculative
 pattern.  The hook should return 1, if the instruction has a speculative form,
-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
 speculation.  If the return value equals 1 then @var{new_pat} is assigned
 the generated speculative pattern.
 @end deftypefn
@@ -9260,7 +9268,7 @@
 @deftypefn Macro int REAL_VALUES_EQUAL (REAL_VALUE_TYPE @var{x}, REAL_VALUE_TYPE @var{y})
 Compares for equality the two values, @var{x} and @var{y}.  If the target
 floating point format supports negative zeroes and/or NaNs,
-@samp{REAL_VALUES_EQUAL (-0.0, 0.0)} is true, and
+@samp{REAL_VALUES_EQUAL (@minus{}0.0, 0.0)} is true, and
 @samp{REAL_VALUES_EQUAL (NaN, NaN)} is false.
 @end deftypefn
 
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 152662)
+++ gcc/doc/invoke.texi	(working copy)
@@ -3809,9 +3819,9 @@
 Warn for implicit conversions that may alter a value. This includes
 conversions between real and integer, like @code{abs (x)} when
 @code{x} is @code{double}; conversions between signed and unsigned,
-like @code{unsigned ui = -1}; and conversions to smaller types, like
+like @code{unsigned ui = @minus{}1}; and conversions to smaller types, like
 @code{sqrtf (M_PI)}. Do not warn for explicit casts like @code{abs
-((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
 changed by the conversion like in @code{abs (2.0)}.  Warnings about
 conversions between signed and unsigned integers can be disabled by
 using @option{-Wno-sign-conversion}.
@@ -9847,7 +9858,7 @@
 @code{pc} stored at @code{fp + 0}.  If the trace function then looks at
 location @code{pc - 12} and the top 8 bits are set, then we know that
 there is a function name embedded immediately preceding this location
-and has length @code{((pc[-3]) & 0xff000000)}.
+and has length @code{((pc[@minus{}3]) & 0xff000000)}.
 
 @item -mthumb
 @opindex mthumb
Index: gcc/doc/md.texi
===================================================================
--- gcc/doc/md.texi	(revision 152662)
+++ gcc/doc/md.texi	(working copy)
@@ -1756,7 +1756,7 @@
 A floating point constant 0.0
 
 @item R
-Integer constant in the range -6 @dots{} 5.
+Integer constant in the range @minus{}6 @dots{} 5.
 
 @item Q
 A memory address based on Y or Z pointer with displacement.
@@ -1787,7 +1787,7 @@
 Constant that fits in 5 bits
 
 @item L
-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
 
 @item G
 Floating point constant that is legal for store immediate
@@ -2381,13 +2381,13 @@
 Any register except accumulators or CC.
 
 @item Ksh
-Signed 16 bit integer (in the range -32768 to 32767)
+Signed 16 bit integer (in the range @minus{}32768 to 32767)
 
 @item Kuh
 Unsigned 16 bit integer (in the range 0 to 65535)
 
 @item Ks7
-Signed 7 bit integer (in the range -64 to 63)
+Signed 7 bit integer (in the range @minus{}64 to 63)
 
 @item Ku7
 Unsigned 7 bit integer (in the range 0 to 127)
@@ -2396,10 +2396,10 @@
 Unsigned 5 bit integer (in the range 0 to 31)
 
 @item Ks4
-Signed 4 bit integer (in the range -8 to 7)
+Signed 4 bit integer (in the range @minus{}8 to 7)
 
 @item Ks3
-Signed 3 bit integer (in the range -3 to 4)
+Signed 3 bit integer (in the range @minus{}3 to 4)
 
 @item Ku3
 Unsigned 3 bit integer (in the range 0 to 7)
@@ -2511,28 +2511,28 @@
 Used to match function return values.
 
 @item Is3
--8 @dots{} 7
+@minus{}8 @dots{} 7
 
 @item IS1
--128 @dots{} 127
+@minus{}128 @dots{} 127
 
 @item IS2
--32768 @dots{} 32767
+@minus{}32768 @dots{} 32767
 
 @item IU2
 0 @dots{} 65535
 
 @item In4
--8 @dots{} -1 or 1 @dots{} 8
+@minus{}8 @dots{} @minus{}1 or 1 @dots{} 8
 
 @item In5
--16 @dots{} -1 or 1 @dots{} 16
+@minus{}16 @dots{} @minus{}1 or 1 @dots{} 16
 
 @item In6
--32 @dots{} -1 or 1 @dots{} 32
+@minus{}32 @dots{} @minus{}1 or 1 @dots{} 32
 
 @item IM2
--65536 @dots{} -1
+@minus{}65536 @dots{} @minus{}1
 
 @item Ilb
 An 8 bit value with exactly one bit set.
@@ -2717,7 +2717,7 @@
 or @code{ori}.
 
 @item N
-A constant in the range -65535 to -1 (inclusive).
+A constant in the range @minus{}65535 to @minus{}1 (inclusive).
 
 @item O
 A signed 15-bit constant.
@@ -2893,7 +2893,7 @@
 A constant in the range of 0 to 255.
 
 @item N
-A constant in the range of 0 to -255.
+A constant in the range of 0 to @minus{}255.
 
 @end table
 
@@ -3012,7 +3038,7 @@
 An immediate for the @code{iohl} instruction.  const_int is treated as a 32 bit value.  
 
 @item I
-A constant in the range [-64, 63] for shift/rotate instructions.  
+A constant in the range [@minus{}64, 63] for shift/rotate instructions.  
 
 @item J
 An unsigned 7-bit constant for conversion/nop/channel instructions.  
@@ -3083,7 +3109,7 @@
 @table @code
 @item (0..4095)
 for short displacement
-@item (-524288..524287)
+@item (@minus{}524288..524287)
 for long displacement
 @end table
 
@@ -4426,7 +4452,7 @@
 respectively.  The expected alignment differs from alignment in operand 4
 in a way that the blocks are not required to be aligned according to it in
 all cases. This expected alignment is also in bytes, just like operand 4.
-Expected size, when unknown, is set to @code{(const_int -1)}.
+Expected size, when unknown, is set to @code{(const_int @minus{}1)}.
 
 Descriptions of multiple @code{movmem@var{m}} patterns can only be
 beneficial if the patterns for smaller modes have fewer restrictions
@@ -4464,7 +4490,7 @@
 respectively.  The expected alignment differs from alignment in operand 4
 in a way that the blocks are not required to be aligned according to it in
 all cases. This expected alignment is also in bytes, just like operand 4.
-Expected size, when unknown, is set to @code{(const_int -1)}.
+Expected size, when unknown, is set to @code{(const_int @minus{}1)}.
 
 The use for multiple @code{setmem@var{m}} is as for @code{movmem@var{m}}.
 

  reply	other threads:[~2009-10-13  7:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  8:35 RFA: Add support for Renesas RX architecture to GCC (take 2) Nick Clifton
2009-10-08 14:14 ` Joseph S. Myers
2009-10-13  8:44   ` Nick Clifton [this message]
2009-10-13 12:32     ` RFA: Adding @minus{} to gcc documentation Joseph S. Myers
2009-10-13 16:12       ` Nick Clifton
2009-10-13 16:17         ` Alfred M. Szmidt
2009-10-13 18:22         ` Joseph S. Myers
2009-10-09 21:57 ` RFA: Add support for Renesas RX architecture to GCC (take 2) Richard Henderson
2009-10-15  8:18   ` Nick Clifton
2009-10-15 13:23     ` Joseph S. Myers
2009-10-15 15:32       ` Richard Henderson
2009-10-15 15:41     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD42A70.2040701@redhat.com \
    --to=nickc@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).