https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78287
Bug ID: 78287 Summary: #line directive with value more than 2147483640 prints out the value twice Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: jussi.judin at ericsson dot com Target Milestone: --- If I give a number with value more than 2147483640 (basically 7 maximum values, 2147483641-2147483647, that are allowed for #line directive), the resulting output from cpp results in the line number and file name printed twice. Following example demonstrates the issue: #line 2147483639 a #line 2147483640 b #line 2147483641 c #line 2147483642 d #line 2147483643 e #line 2147483644 f #line 2147483645 g #line 2147483646 h #line 2147483647 i When running this through cpp (GCC 4.8 and the latest git master as of today) it results in following output where line numbers over 2147483640 are printed twice: # 1 "line.c" # 1 "<built-in>" # 1 "<command-line>" # 31 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "<command-line>" 2 # 1 "line.c" # 2147483639 "line.c" a # 2147483640 "line.c" b # 2147483641 "line.c" # 2147483641 "line.c" c # 2147483642 "line.c" # 2147483642 "line.c" d # 2147483643 "line.c" # 2147483643 "line.c" e # 2147483644 "line.c" # 2147483644 "line.c" f # 2147483645 "line.c" # 2147483645 "line.c" g # 2147483646 "line.c" # 2147483646 "line.c" h # 2147483647 "line.c" # 2147483647 "line.c" i