Using address space attribute in LLVM

Hello,

What is the correct way to use address_space attribute? For CLANG, I used the below code, but when I tried the same with LLVM, I got a warning.

Thanks in advance,

Juan Carlos

Hello,

What is the correct way to use address_space attribute? For CLANG, I used the below code, but when I tried the same with LLVM, I got a warning.

llvm-gcc doesn't support address spaces. This is a clang-only feature.

-Chris

llvm-gcc doesn't support address spaces. This is a clang-only feature.

However it could be implemented in llvm-gcc.

Ciao,

Duncan.

Hello,

I also found that llvm-gcc does not support the section attribute. Is there a common reason for that?

Thanks,

Juan Carlos

Hello,

I also found that llvm-gcc does not support the section attribute. Is there a common reason for that?

It should, do you have a testcase where gcc works but llvm-gcc doesn’t?

-Chris

No. My reference point is CLANG.

I don’t understand what you are saying, does llvm-gcc disagree with clang? Does your example work with gcc?

Please email llvmdev instead of me directly.

-Chris

Hello Chris,

My first impression was that LLVM-GCC does not support section attribute, but it was my bad. I was trying to specify a section attribute for a local variable. When I run the test in clang… it works as I expected; however, later I realized that both gcc and llvm-gcc do not allow it.

My question is still live… why is the reason for that?

Regards,

Juan Carlos

No. My reference point is CLANG.

I don’t understand what you are saying, does llvm-gcc disagree with clang?

Yes. llvm does not allow to specify a section attribute for local variables, but clang does.

Does your example work with gcc?

No. in this case, gcc and llvm-gcc generate the same error.

Why is the reason for "what" specifically? Please provide a testcase, I don't know what you're talking about.

-Chris