This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
I started this thread on the Keystone Multicore forum. They requested I re-post on the compiler forum.
Cheers2u
Eddie
Most of the time, errors similar to this are not due to some problem with the compiler tools. Typically, the software package is not configured correctly, or is otherwise being used incorrectly.
For this specific case, what do you see that make you think this is a problem with the compiler itself?
Thanks and regards,
-George
Hi George
I replicated the two code sections that were causing errors below from the previous post. They do not look like they are configuration issues, but more like C vs C++ compiler issues.
Const issue (not sure how const compiled OK with C either because ";" is missing)
#if 1 #warn "Eddie Changed const to #define because of compiler error: expected at ;" #define c1 ((I32_IQ)(0xffffffff)) #define c2 ((I64_IQ)(0xffffffff80000000)) #define c3 ((I64_IQ)(0x7fffffff)) #define c4 ((I32_IQ)(0x80000000)) #define c5 ((0xffffffff)) #define c6 ((0x80000000)) #else // This causes a compiler error const I32_IQ c1 ((I32_IQ)(0xffffffff)) const I64_IQ c2 ((I64_IQ)(0xffffffff80000000)) const I64_IQ c3 ((I64_IQ)(0x7fffffff)) const I32_IQ c4 ((I32_IQ)(0x80000000)) const unsigned int c5 ((0xffffffff)) const unsigned int c6 ((0x80000000)) #endif
Tables compiler error (I had to remove const - but maybe there is another way to do this for C++)
#if 1 #warn "Eddie had to remove const to get this to compile" I32_IQ IQdivTable[]={ #else const I32_IQ IQdivTable[]={ #endif
The project is in the original post if you'd like to see the compile errors.
Cheers
Eddie
I cut the const issue down to this code fragment ...
typedef int I32_IQ; typedef long long I64_IQ; int fxn() { const I32_IQ c1 ((I32_IQ)(0xffffffff)) const I64_IQ c2 ((I64_IQ)(0xffffffff80000000)) return c1 + c2; }
I cannot find any C or C++ compiler, TI or otherwise, which accepts this code. The TI compiler development team is not responsible for this IQmath library. I don't know how this code came to be in that library. I still wonder if this isn't a configuration issue, or some macro being used in an unexpected way, or something like that.
Thanks and regards,
-George