Hi, I have the following declaration in my code:
u32 volatile __attribute__((nocast)) *A, *B;
Is this equivalent to:
u32 volatile __attribute__((nocast)) *A;
u32 volatile __attribute__((nocast)) *B;
or:
u32 volatile __attribute__((nocast)) *A;
u32 volatile *B;
or even:
u32 volatile __attribute__((nocast)) *A;
u32 *B;
A small update for this. It's linux kernel code, so the only possible compiler is gcc. I know that I'm probably going to end up writing this on multiple lines, but I am curious.
For example, in the following linux kernel code, they use it similarly to how I wanted to. Is that code buggy?
One final update, if I use the following code:
int main() {
int __attribute__((weak)) a, b;
}
I get the following warnings under gcc:
foo.c: In function ‘main’:
foo.c:5: error: weak declaration of ‘a’ must be public
foo.c:5: error: weak declaration of ‘b’ must be public
This says to me that it's trying to apply the attribute to both variables. I'm going to run with the idea that it doesn't vary over attribute types.