Consider this reduced translation unit: --- // foo ??/ x ---
... where there is no newline after the X. Compiled like so: $ gcc bug.c -Wall -pedantic -fsyntax-only -trigraphs -std=c99 yields: bug.c:2:9: warning: trigraph ??/ converted to \ bug.c:2:9: warning: backslash-newline at end of file bug.c:2:1: warning: multi-line comment bug.c:1: warning: ISO C forbids an empty source file A couple of issues. First, the diagnostics are not sorted. The last one should be issued first. Second, more importantly, the 2nd diagnostic is incorrect. There is no backslash-newline at the end of the file. The first and third diagnostics are accurate. Again, note that there should be *no* newline after the x to reproduce this. -Chris -- Summary: bogus 'backslash-newline at end of file' warning Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sabre at nondot dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27750