[Issue 21620] New: pragma(crt_constructor) should run on all functions in block referred to

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 9 08:08:29 UTC 2021


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

          Issue ID: 21620
           Summary: pragma(crt_constructor) should run on all functions in
                    block referred to
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

Currently,

  extern (C)
    pragma(crt_constructor) {
        void abc() { }
        void def() { }
    }

fails, while:

  extern (C) {
    pragma(crt_constructor) {
        void abc() { }
    }
    pragma(crt_constructor) {
        void def() { }
    }
  }

succeeds. This makes no sense. The pragma should behave like every other
attribute that affects a block.

Same goes for pragma(crt_destructor)

--


More information about the Digitalmars-d-bugs mailing list