https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62059
Bug ID: 62059 Summary: signed integer overflow in diagnostic.c adjust_line Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Created attachment 33272 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33272&action=edit Used by test case // gcc 4.9.1 // ../../gcc-4.9.1/gcc/diagnostic.c:274:42: runtime error: signed integer overflow: 2147483646 - -4 cannot be represented in type 'int' // installparse.l is a one line file containing "%{%}" I am attaching it anyway // offending instruction in diagnostic.c function adjust_line is // right_margin = max_width - right_margin; // where max_width==INT_MAX and right_margin is negative (here is -4) # 1 "installparse.l" static foo(void); void bar(void) { foo(); } I am attaching installparse.l