<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.8">
<TITLE>problem: address space attribute C/C++</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
I have a problem with clang and the address space attribute. I don't know if it is intended or a bug. The following code compiles fine as a .c file but fails as .cpp:<BR>
<BR>
C-Code:<BR>
int __attribute__((address_space(1))) globalint = 10;<BR>
<BR>
bitcode:<BR>
@globalint = addrspace(1) global i32 10, align 4  ; <i32 addrspace(1)*> [#uses=0]<BR>
<BR>
Error in clangtest.cpp:<BR>
clangtest.cpp:2:39: error: cannot initialize a variable of type 'int<BR>
      __attribute__((address_space(1)))' with an rvalue of type 'int'<BR>
int __attribute__((address_space(1))) globalint = 10;<BR>
                                      ^           ~~<BR>
1 error generated.<BR>
<BR>
I have additional problems with classes. In which cases are none zero address spaces supported, is there a documentation around?<BR>
<BR>
thanks in advance,<BR>
Helge<BR>
</FONT>
</P>

</BODY>
</HTML>