 
					
				
		
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
| Constant | Suffix | Type | 
| 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)?
Solved! Go to Solution.
 
					
				
		
Hello
You can use an explicit cast to tell the compiler you want the value to be treated as 8-bit value.
CrasyCat
 
					
				
		
Hello
You can use an explicit cast to tell the compiler you want the value to be treated as 8-bit value.
CrasyCat
 
					
				
		
Yes, this is a way.
But why use in mc9s08qe64.h « - 18.05.2010, V2.32 - MISRA compliance: U/UL suffixes added to all numbers (_MASK,_BITNUM and addresses) » that implies 16-bit vaule even if qe64 is an 8-bit mcu?
