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.

TMS570LC4357: serious omission in assembler .cdecls enum handling

Part Number: TMS570LC4357

(This is under CCS 7.4.0.00015 -- yes I know it's rather old, I'm dealing with some old code...)  In the assembler, simplifying the original greatly:

.cdecls C
%{
  enum { CPU_MODE = 0x1f };
%}
  .text
  and r5, r0, #CPU_MODE

draws an "unknown symbol" error.  There doesn't seem to be any way for assembler code to reference a C enumerated constant declared without an enum tag name (which is legal C, and always has been, and is now a fairly common way of declaring integer constants).