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

            Bug ID: 122295
           Summary: -gnatyr does not report style violation for package
                    instantiation
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jesper.quorning at gmail dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

This program does not report style check violations for generic package
instantiations.
Generic procedure instantiation reports style check violation.

$ gnatmake -gnaty main.adb
gcc -c -gnaty main.adb
main.adb:20:27: (style) bad casing of "Gen_Dummy" declared at line 10 [-gnatyr]
gnatbind -x main.ali
gnatlink main.ali

I expected bad casing style errors for lines 15, 19 as well.

```Ada
with Ada.Containers.Vectors;

procedure Main is

   generic
   package Gen_Empty is
   end Gen_Empty;

   generic
   procedure Gen_Dummy;

   procedure Gen_Dummy is null;

   package My_Vector is new
     ada.containers.vectors           -- Does not report style check violation
       (Index_Type   => Positive,
        Element_Type => Integer);

   package Empty is new gen_empty;    -- Does not report style check violation
   procedure Dummy is new gen_dummy;  -- Reports style check violation

   V : My_Vector.Vector;
begin
   V.Append (12);
end Main;
```

Thank You

Reply via email to