#include <stdio.h> int foo() { puts("Hello world"); return 0; } int main() { foo() << 30 << 2; return (unsigned)foo() >> 16 >> 16; }
% gcc test.c % ./a.out % -- Summary: Shift optimization discards operands' side effects Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: foo at mailinator dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39855