diff options
author | Justin Squirek <squirek@adacore.com> | 2020-10-12 12:06:08 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-25 08:22:31 -0500 |
commit | e480bca2400d891bbde62e68d6a8f573848c22c6 (patch) | |
tree | fb218822eb6d695b0ebe328ddb551c1a71235590 /gcc/ada/doc | |
parent | 4d617c3f2ad9a6a4f8718cd216421eeb65ede262 (diff) | |
download | gcc-e480bca2400d891bbde62e68d6a8f573848c22c6.zip gcc-e480bca2400d891bbde62e68d6a8f573848c22c6.tar.gz gcc-e480bca2400d891bbde62e68d6a8f573848c22c6.tar.bz2 |
[Ada] Crash on right shift operator for signed integers
gcc/ada/
* doc/gnat_rm/intrinsic_subprograms.rst (Shifts and Rotates):
Document behavior on negative numbers
* gnat_rm.texi: Regenerate.
* sem_eval.adb (Fold_Shift): Set modulus to be based on the RM
size for non-modular integer types.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r-- | gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst index bf9f0b9e..e448816 100644 --- a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst +++ b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst @@ -217,7 +217,9 @@ The formal parameter names can be anything. A more convenient way of providing these shift operators is to use the Provide_Shift_Operators pragma, which provides the function declarations -and corresponding pragma Import's for all five shift functions. +and corresponding pragma Import's for all five shift functions. Note that in +using these provided shift operations, shifts performed on negative numbers +will result in modification of the sign bit. .. _Source_Location: |