This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Christian Groessler <cpg@aladdin.de> writes:I have the following program which takes 2 unsigned short values, multiplies them and shifts the result right.
This right shift gives a value with 1s bits at the high end.
This is correct. The promotion rules let unsigned short promote to int,
since the latter can represent all values of the former.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |