[Issue 24614] New: Can’t throw in -betterC mode with -preview=dip1008 (@nogc Exceptions)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 17 11:26:59 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24614

          Issue ID: 24614
           Summary: Can’t throw in -betterC mode with -preview=dip1008
                    (@nogc Exceptions)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: qs.il.paperinik at gmail.com

Maybe this is invalid, but the Description section of DIP 1008 ("Exceptions and
@nogc") gives the impression that this should be possible.

Quote from DIP 1008:
> The issue is [exceptions being GC allocated] […] prevents building D programs that do not link in the GC runtime.

The prime example for D programs without GC runtime are `-betterC` programs.
That `-betterC` mode does not allow for Exceptions may be due to reasons other
than being unable to GC-allocate them, but maybe not, and therefore this bug
report.

--


More information about the Digitalmars-d-bugs mailing list