www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21620] New: pragma(crt_constructor) should run on all

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 puremagic.com
          Reporter: bugzilla 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)

--
Feb 09