Hello,
I tried to use it like this:
typedef void * aatest;
or
typedef void* unsafe aatest;
Can't compile, please tell me how to use it correctly.
Typedef cannot be used on pointers
-
- Newbie
- Posts: 1
- Joined: Thu May 23, 2024 4:39 am
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
You've not really said what you're trying to do (I note this is also a copy and paste from an old thread)
However, the code snippet below uses your typedef in a couple of ways in xc and compiles.
However, the code snippet below uses your typedef in a couple of ways in xc and compiles.
Code: Select all
typedef void* unsafe aatest;
aatest a(aatest y)
{
unsafe
{
aatest x = y+1;
return x;
}
}
Hopefully that's useful.
Technical Director @ XMOS. Opinions expressed are my own