Hi, I noticed that GCC converts short arithmetic to unsigned short. short foo2 (short a, short b) { return a - b; }
In .gimple file: foo2 (short int a, short int b) { short int D.3347; short unsigned int a.0; short unsigned int b.1; short unsigned int D.3350; a.0 = (short unsigned int) a; b.1 = (short unsigned int) b; D.3350 = a.0 - b.1; D.3347 = (short int) D.3350; return D.3347; } Is this for some C standard conformance, or optimization purpose? This doesn't happen with int type. Thanks, Bingfeng Mei