r260590 - in /trunk/gcc/ada: ChangeLog libgnat/...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Wed May 23 10:23:00 GMT 2018
Author: pmderodat
Date: Wed May 23 10:23:19 2018
New Revision: 260590
URL: https://gcc.gnu.org/viewcvs?rev=260590&root=gcc&view=rev
Log:
[Ada] Vectors: spurious error in -gnatwE mode
This patch fixes a bug in which if Ada.Containers.Vectors is instantiated with
an Index_Type such that Index_Type'Base'Last is less than Count_Type'Last, and
the -gnatwE switch is used, the compiler gives spurious error messages.
The following test should compile quietly with -gnatwE:
gnatmake short_vectors.ads -gnatwa -gnatwE -gnatf
with Ada.Containers.Vectors;
package Short_Vectors is
type Index_Type is range 1 .. 256;
package Map_Pkg is new Ada.Containers.Vectors
(Index_Type => Index_Type,
Element_Type => Integer);
end Short_Vectors;
2018-05-23 Bob Duff <duff@adacore.com>
gcc/ada/
* libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
code in question is not reachable in the case where Count_Type'Last is
out of range.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/libgnat/a-convec.adb
More information about the Gcc-cvs
mailing list