<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">About a year ago, I found a bug with the interaction of address spaces and C++ pointers to members. Applying a pointer-to-member to a pointer discards the address space of the pointer if it had one. For instance, with this code:</div><div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">struct foo {</div><div class=""> int bar;</div><div class="">};</div><div class=""><br class=""></div><div class="">#define AS1 __attribute__((address_space(1)))</div><div class=""><br class=""></div><div class="">int main()</div><div class="">{</div><div class=""> foo AS1* f;</div><div class=""> int AS1* x = &(f->*(&foo::bar));</div><div class="">}</div></blockquote></div><div class=""><br class=""></div><div class="">Clang says:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">cannot initialize a variable of type '__attribute__((address_space(1))) int *' with an rvalue of type 'int *'</blockquote></div><div class=""><br class=""></div><div class="">I filed a bug (<a href="https://llvm.org/bugs/show_bug.cgi?id=25941" class="">https://llvm.org/bugs/show_bug.cgi?id=25941</a>) and even had a patch for it when I found it, but I never followed through. The patch is one single line of code and appears to be still applicable. What are the next steps to get the problem fixed?</div><div class=""><br class=""></div><div class="">FĂ©lix</div></body></html>