public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/105212] New: -gnatwu gives false error message for certain arrays.
@ 2022-04-10 22:14 service at totalplanlos dot de
  2023-05-11 16:23 ` [Bug ada/105212] " ebotcazou at gcc dot gnu.org
  2023-06-24 14:24 ` service at totalplanlos dot de
  0 siblings, 2 replies; 3+ messages in thread
From: service at totalplanlos dot de @ 2022-04-10 22:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105212

            Bug ID: 105212
           Summary: -gnatwu gives false error message for certain arrays.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: service at totalplanlos dot de
  Target Milestone: ---

If you use the "-gnatwu" (unused entities) warning, index values of an array
are explicitly set (with "=>") and the total number of elements of the array
exceeds 64, then a false warning occurs. It is not important whether the
explicit specification is made with "others => 1" or with "1 => 1, 2 => 1, .. ,
65 => 1". Without an explicit definition like "1, 1, .. , 1" this wrong message
does not appear. Also applies to arrays with multiple dimensions.

First Example:

   procedure Test is

      type OneArray is array (1 .. 65) of Integer;
      -- (1 .. 64) gives no wrong error message.
      One : OneArray;

   begin

      One := (others => 10);

   end Test;


Second Example:

   with AnotherFile;

   procedure Main
   is begin

      AnotherFile.Two := (others => 10);

   end Main;


   package AnotherFile is

      type TwoArray is array (1 .. 65) of Integer;
      Two : TwoArray;

   end AnotherFile;


Tested with Debian Gnat 12-20220319-1, Debian Gnat 11.2.0-19 and Alire Gnat
11.2, occurs every time.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/105212] -gnatwu gives false error message for certain arrays.
  2022-04-10 22:14 [Bug ada/105212] New: -gnatwu gives false error message for certain arrays service at totalplanlos dot de
@ 2023-05-11 16:23 ` ebotcazou at gcc dot gnu.org
  2023-06-24 14:24 ` service at totalplanlos dot de
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-05-11 16:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105212

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org
   Last reconfirmed|                            |2023-05-11
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Rather weird indeed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/105212] -gnatwu gives false error message for certain arrays.
  2022-04-10 22:14 [Bug ada/105212] New: -gnatwu gives false error message for certain arrays service at totalplanlos dot de
  2023-05-11 16:23 ` [Bug ada/105212] " ebotcazou at gcc dot gnu.org
@ 2023-06-24 14:24 ` service at totalplanlos dot de
  1 sibling, 0 replies; 3+ messages in thread
From: service at totalplanlos dot de @ 2023-06-24 14:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105212

--- Comment #2 from Honki Tonk <service at totalplanlos dot de> ---
The error still occurs with version 13.1.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-24 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-10 22:14 [Bug ada/105212] New: -gnatwu gives false error message for certain arrays service at totalplanlos dot de
2023-05-11 16:23 ` [Bug ada/105212] " ebotcazou at gcc dot gnu.org
2023-06-24 14:24 ` service at totalplanlos dot de

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).