Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Least favorite C style

Name: Anonymous 2016-10-01 6:42

http://stackoverflow.com/questions/11187150/gcc-weird-integer-promotion-scheme
Did you know C standard silently promotes integers to larger size, because "its good for you". Portable assembler my ass.

Name: Cudder !cXCudderUE 2016-10-01 16:55

>>5
Introduce a double into a calculation involving shorts and ints, and the final result will also be a double.

The standard leaves a lot unspecified, but if you add two chars together and store the result in a char, a compiler should be smart enough to figure out that no widening is needed because it doesn't matter one bloody bit.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List