[Bug c/70389] New: uint_16t left shift with -Wconversion produces incorrect warning

2016-03-24 Thread bobgmeyers at muchomail dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bobgmeyers at muchomail dot com Target Milestone: --- This code: int main(void){ uint16_t x; x=5; do{ x<<=1U; x++; }while(1); } The code obviously outputs nothin

[Bug c/70389] uint_16t left shift with -Wconversion produces incorrect warning

2016-03-25 Thread bobgmeyers at muchomail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70389 --- Comment #2 from Bob Meyers --- Does the most recent C spec actually say that short unsigned ints should be promoted to signed ints prior to a left shift? (But somehow "x++" just increments the short unsigned int x with no such implicit conver