AnsweredAssumed Answered

warning C2705 - cw10.1

Question asked by roberto.m on Nov 11, 2011
Latest reply on Nov 11, 2011 by roberto.m

Hi to all,

In my new «adventure» with  CW10.1 (porting a project, based on hcs08 qe64,  from CW 6.3), I meet a lot of «warnings».

Warnings (they weren't with CW 6.3) are generated by:

 

TPM1C2SC &= ~TPM1C2SC_CH2F_MASK;

 

I think because (from help)

 

CodeWarrior for Microcontrollers V10.x > HCS08/RS08 for Microcontrollers > RS08 Build Tools Reference Manual > Porting Tips and FAQs

 

Number Formats

Valid constant floating number suffixes are f and F for float and l or Lfor long double. Note that floating constants without suffixes are double constants in ANSI. For exponential numbers e or E has to be used. - and + can be used for signed representation of the floating number or the exponent.

The following suffixes are supported (Table A.2):


Table A.2 Supported number suffixes

ConstantSuffixType
floating
F
float
floating
L
long double
integral
U
unsigned in t
integral
uL
unsigned long

 

#define TPM1C2SC_CH2F_MASK              128U

 

U => implies unsigned int (16 bit). Registers of qe64 are 8 bit wide.

How can I avoid C2705 without disable it (with #PRAGMA)?

Outcomes