[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character [-Wnewline-eof]

2023-04-17 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #16 from Eric Gallager --- (In reply to Andrew Pinski from comment #15) > (In reply to Vincent Lefèvre from comment #14) > > Even though GCC decides to add a newline to the logical file, so that the > > missing diagnostic can be

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character [-Wnewline-eof]

2023-04-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #15 from Andrew Pinski --- (In reply to Vincent Lefèvre from comment #14) > Even though GCC decides to add a newline to the logical file, so that the > missing diagnostic can be regarded as correct, I think that an optional > warning

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character [-Wnewline-eof]

2023-04-17 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #14 from Vincent Lefèvre --- (In reply to Andrew Pinski from comment #13) > GCC removed the pedwarning on purpose (between GCC 4.1 and 4.4), see PR > 14331 and PR 68994. No, PR 14331 was just asking to remove the warning by

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2023-04-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2023-04-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #12 from Sam James --- (In reply to Sam James from comment #11) > C99 seems to explicitly say, within Clause J.2, in the second bullet point: This seems to be in C23 still.

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2023-04-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #11 from Sam James --- C99 seems to explicitly say, within Clause J.2, in the second bullet point: > >1 The behavior is undefined in the following circumstances: > >[...] >A nonempty source file does not end in a new-line

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #10 from Jonathan Wakely --- (In reply to Vincent Lefèvre from comment #9) > Changed back to INVALID (there's a bug in bugzilla, which changes INVALID to > FIXED after a reload + a new comment). Sounds like something your browser

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 Vincent Lefèvre changed: What|Removed |Added Resolution|FIXED |INVALID --- Comment #9 from Vincent

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #8 from Vincent Lefèvre --- (In reply to Vincent Lefèvre from comment #7) > Here one gets two different results! For this latest issue (which is the cause of the error in C), I've reported PR81746.

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #7 from Vincent Lefèvre --- And with only the preprocessor: $ printf 'int main(void) { return 0; } \\' | gcc -E - # 1 "" # 1 "" # 1 "" # 31 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "" 2 # 1 "" int main(void) { return 0; } \ $

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #6 from Vincent Lefèvre --- (In reply to Andrew Pinski from comment #5) > Also see http://www.opengroup.org/austin/aardvark/latest/xcubug2.txt > ERN 76 This is not about the missing newline at the end of a file. Moreover, GCC

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #5 from Andrew Pinski --- Also see http://www.opengroup.org/austin/aardvark/latest/xcubug2.txt ERN 76

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 Vincent Lefèvre changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #4 from Vincent

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #1 from Andrew Pinski --- IIRC There was some discussion before and it was decided that the warning was not needed.

[Bug preprocessor/81745] missing warning with -pedantic when a C file does not end with a newline character

2017-08-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81745 --- Comment #2 from Andrew Pinski --- See the thread starting at https://gcc.gnu.org/ml/gcc-patches/2007-04/msg00457.html .