public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/114380] New: Incorrect type specified in an error message
@ 2024-03-18 15:46 gaius at gcc dot gnu.org
  2024-03-18 15:47 ` [Bug modula2/114380] " 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-18 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114380
           Summary: Incorrect type specified in an error message
           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: ---

The source code:

MODULE tiny4 ;

FROM SYSTEM IMPORT WORD ;

PROCEDURE func () : WORD ;
BEGIN
   RETURN WORD (0)
END func ;

VAR
   b: BITSET ;
BEGIN
   b := func () - {6..31}
END tiny4.

when compiled should complain about BITSET rather than CARDINAL.

$ gm2 tiny4.mod 
tiny4.mod:13:17: error: In program module 'tiny4': type incompatibility between
'CARDINAL' and 'WORD'
   13 |    b := func () - {6..31}
      |         ~~~~~~~~^~~~~~~~~

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

end of thread, other threads:[~2024-03-18 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 15:46 [Bug modula2/114380] New: Incorrect type specified in an error message gaius at gcc dot gnu.org
2024-03-18 15:47 ` [Bug modula2/114380] " gaius at gcc dot gnu.org
2024-03-18 16:02 ` gaius at gcc dot gnu.org
2024-03-18 16:04 ` gaius at gcc dot gnu.org
2024-03-18 16:41 ` cvs-commit at gcc dot gnu.org
2024-03-18 16:41 ` gaius 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).