[Issue 17289] New: With Xcode 8.3 linker, warnings of "pointer not aligned"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 31 17:37:50 PDT 2017


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

          Issue ID: 17289
           Summary: With Xcode 8.3 linker, warnings of "pointer not
                    aligned"
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: schveiguy at yahoo.com

Just updated to Xcode 8.3 and tried to build D libraries. I get a whole bunch
of messages that look similar to this:

ld: warning: pointer not aligned at address 0x10003A8BB
(_D11TypeInfo_Pv6__initZ + 0 from testpointernotaligned.o)

Code that reproduces this:

import std.typecons;

struct X
{
    RefCounted!(int*) x;
}

void main()
{
}

RefCounted seems to trigger it. Not sure what triggers it or not, but always
seems to be the initializer that has the issue.

This happens on compilers back to 2.069.0. It does not happen on 2.068.2.

Note that the program compiles and runs, but this warning should not happen.

--


More information about the Digitalmars-d-bugs mailing list