diff options
author | Paolo Bonzini <bonzini@gcc.gnu.org> | 2015-11-26 10:16:56 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2015-11-26 10:16:56 +0000 |
commit | a37a22da2d9304489f6e4b91d0a357c25e0a0a79 (patch) | |
tree | f08c5c4a84f39509e9a5612c1b230f50aa30910a /gcc/doc/implement-c.texi | |
parent | b3877860a8dbefda221923faa57ba7f3c88ff4e9 (diff) | |
download | gcc-a37a22da2d9304489f6e4b91d0a357c25e0a0a79.zip gcc-a37a22da2d9304489f6e4b91d0a357c25e0a0a79.tar.gz gcc-a37a22da2d9304489f6e4b91d0a357c25e0a0a79.tar.bz2 |
implement-c.texi (Integers Implementation): Make GCC's promises about signed left shift stronger and clarify the cases when...
2015-11-26 Paolo Bonzini <bonzini@gnu.org>
* doc/implement-c.texi (Integers Implementation): Make GCC's promises
about signed left shift stronger and clarify the cases when they're
broken.
From-SVN: r230931
Diffstat (limited to 'gcc/doc/implement-c.texi')
-rw-r--r-- | gcc/doc/implement-c.texi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi index b8f8f29..7fa3fb4 100644 --- a/gcc/doc/implement-c.texi +++ b/gcc/doc/implement-c.texi @@ -266,9 +266,11 @@ both the sign and value bits, where the sign bit is considered immediately above the highest-value value bit. Signed @samp{>>} acts on negative numbers by sign extension. -GCC does not use the latitude given in C99 and C11 only to treat certain -aspects of signed @samp{<<} as undefined, but this is subject to -change. +As an extension to the C language, GCC does not use the latitude given in +C99 and C11 only to treat certain aspects of signed @samp{<<} as undefined. +However, @option{-fsanitize=shift} (and @option{-fsanitize=undefined}) will +diagnose such cases. They are also diagnosed where constant +expressions are required. @item @cite{The sign of the remainder on integer division (C90 6.3.5).} |