
Jivin Shawn Jin lays it down ...
Dear David,
The code is extracted from the header file processor.h.
51> union debug_insn { 52> u32 arm; 53> u16 thumb; 54> }; 55> 56> struct debug_entry { 57> u32 address; 58> union debug_insn insn; 59> };
However I really don't think there is any syntax error. It might be a toolchain problem?
I think, at least for that version of the toolchain, it implicitly defines "arm", and I suspect it defines it to be "1", thus the errors you are seeing. You may be able to add a -Uarm to eth build line,
It did solve the problem. Thank you!
Would you please explain a little bit more why the toolchain implicitly defines "arm"? Should or should not for a toolchain to define this? Or we can simply re-name "arm" in struct debug_insn to another name?
Most compilers predefine a number of things to help coders port/identify what the code is being built for. For example, on a coldfire target __mcf5200 may be defined. Have a look at:
http://www.ucdot.org/article.pl?sid=02/10/02/035241
I don't think the newer gcc's define "arm" and I cannot recall why the current 2.95.3 compiler does, but if you can easily change the name of that field in the structure it would be the safest option IMO,
Cheers, Davidm