This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/15840] New: Illegal program not detected, RM 3.7(14)


-- RM95 3.7(14)
-- If the parent type is not a tagged type, then each
-- discriminant of the derived type shall be used in
-- the constraint defining the parent subtype;
generic
   type T1 is private;
package Test_247013 is
   type T2 (x: integer) is new T1;  -- ERROR: x not used
end Test_247013;


I expect an error message like this:
test_247013.ads:8:11: Discriminant "x" is not used to constrain the parent
subtype "T1" (RM 3.7(14))

But the compiler says nothing

-- 
           Summary: Illegal program not detected, RM 3.7(14)
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15840


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]