public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/108842] New: Cannot use enum array with -fno-druntime
@ 2023-02-18  7:34 zach-gcc at cs dot stanford.edu
  2023-07-07 19:21 ` [Bug d/108842] " cvs-commit at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zach-gcc at cs dot stanford.edu @ 2023-02-18  7:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108842
           Summary: Cannot use enum array with -fno-druntime
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: zach-gcc at cs dot stanford.edu
  Target Milestone: ---

I have test.d:

```
enum int[] x = [0, 1, 2];
```

and an object.d:

```
module object;
```

I get an error when I try to compile:

```
$ gdc -c -fno-druntime test.d
test.d:1:16: error: expression '[0, 1, 2]' requires 'object.TypeInfo' and
cannot be used with '-fno-rtti'
    1 | enum int[] x = [0, 1, 2];
      |                ^
test.d:1:16: error: 'object.TypeInfo' could not be found, but is implicitly
used
    1 | enum int[] x = [0, 1, 2];
      |                ^
```

This compiles fine with DMD and LDC with `-betterC` and the same object.d
(custom runtime).

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

end of thread, other threads:[~2023-07-07 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-18  7:34 [Bug d/108842] New: Cannot use enum array with -fno-druntime zach-gcc at cs dot stanford.edu
2023-07-07 19:21 ` [Bug d/108842] " cvs-commit at gcc dot gnu.org
2023-07-07 19:22 ` cvs-commit at gcc dot gnu.org
2023-07-07 19:25 ` cvs-commit at gcc dot gnu.org
2023-07-07 20:00 ` cvs-commit at gcc dot gnu.org
2023-07-07 20:01 ` ibuclaw 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).