public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/114333] New: set type comparison against a cardinal should cause an error
@ 2024-03-14  8:39 gaius at gcc dot gnu.org
  2024-03-14  8:57 ` [Bug modula2/114333] " gaius at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-03-14  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114333
           Summary: set type comparison against a cardinal should cause an
                    error
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

gm2 incorrectly allows set types to be compared to ZTyped constants.  For
example the following code should generate an error at the IF expression.

MODULE badset2 ;

FROM libc IMPORT printf ;


PROCEDURE init ;
VAR
   s: SET OF [1..2] ;
BEGIN
   IF s = 10
   THEN
      printf ("failure\n")
   END
END init ;


BEGIN
   init
END badset2.

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

end of thread, other threads:[~2024-03-14 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14  8:39 [Bug modula2/114333] New: set type comparison against a cardinal should cause an error gaius at gcc dot gnu.org
2024-03-14  8:57 ` [Bug modula2/114333] " gaius at gcc dot gnu.org
2024-03-14  9:03 ` gaius at gcc dot gnu.org
2024-03-14 11:24 ` cvs-commit at gcc dot gnu.org
2024-03-14 11:25 ` gaius at gcc dot gnu.org
2024-03-14 15:35 ` cvs-commit at gcc dot gnu.org

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