https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90477
Bug ID: 90477 Summary: negative line numbers should not be displayed Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jg at jguk dot org Target Milestone: --- Using godbolt trunk gcc shows negative numbers, I don't know if it is any better to put a ceiling, at least if the line number was stuck at 2147483646 that might be better than wrapping to negative. Although making line numbers 64bit might be a nicer solution. #pragma message "A1" #line 2147483647 #pragma message "A1" #1 with x86-64 gcc (trunk) <source>:1:17: note: #pragma message: A1 1 | #pragma message "A1" | ^~~~ <source>:-2147483648:17: note: #pragma message: A1 Compiler returned: 0