[Bug c/68994] New: GCC doesn't issue any diagnostic for missing end-of-line marker
pponnuvel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Dec 19 18:52:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68994
Bug ID: 68994
Summary: GCC doesn't issue any diagnostic for missing
end-of-line marker
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: pponnuvel at gmail dot com
Target Milestone: ---
Considering a source file created like this
$ printf "int main(void) {return 0;}" > test.c
$ wc test.c
0 4 26 test.c
$ gcc -Wall -Wextra -pedantic-errors -std=c11 test.c
$ echo $?
0
(wc command reports 0 newlines)
C11 standard, §5.1.1.2, says
[..] A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character before any
such
splicing takes place.
The above code violates this constraint. But gcc doesn't issue any diagnostic
about it.
Compiled using gcc 5.1.1/glibc 2.21 on Debian.
More information about the Gcc-bugs
mailing list