Hi,
I am getting the below errors while compiling project
any hint to sort it out it seams compiler problem, because code working fine in Xcode
The errors as below:
error :call makes alias in function
error: pointer cast discards const qualifier
BR//
error: call makes alias in function & error: pointer cast di
-
- Member++
- Posts: 19
- Joined: Sun Mar 23, 2014 9:51 pm
-
Verified
- XCore Legend
- Posts: 1164
- Joined: Thu May 27, 2010 10:08 am
Pointers in XC have restrictions/special cases due to parallelism and shared memory to keep things thread safe (keeping track of aliasing, bounds checking etc.)
See section 5.2.4. https://www.xmos.com/download/private/X ... 28F%29.pdf
There is probably a pointer type for you to do what you want, except you will need to annotate the pointer type. There are lots of examples
The alternative is to call c functions (in a different file), and then you can do whatever you want (and get in to trouble) as per normal!
See section 5.2.4. https://www.xmos.com/download/private/X ... 28F%29.pdf
There is probably a pointer type for you to do what you want, except you will need to annotate the pointer type. There are lots of examples
The alternative is to call c functions (in a different file), and then you can do whatever you want (and get in to trouble) as per normal!
-
- Member++
- Posts: 19
- Joined: Sun Mar 23, 2014 9:51 pm
Hi,
Thanks a lot call make alias have been resolved but using alias, but I am still getting errors for pointer cast discards const qualifier. I tried to use unsafe functions but it cause other errors. Also i tried to make different C source file but it was not the helpful. I hope I will be able to get fruther help if possible
BR//
Thanks a lot call make alias have been resolved but using alias, but I am still getting errors for pointer cast discards const qualifier. I tried to use unsafe functions but it cause other errors. Also i tried to make different C source file but it was not the helpful. I hope I will be able to get fruther help if possible
BR//
-
Verified
- XCore Legend
- Posts: 1185
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Are you trying to compile C code in an .xc file?
-
- Member++
- Posts: 19
- Joined: Sun Mar 23, 2014 9:51 pm
Yes, there are some file i did it in C