[Bug c++/113839] misleading syntax error message

2024-02-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 --- Comment #5 from Jonathan Wakely --- (In reply to Frank Heckenbach from comment #0) > While I appreciate gcc trying to by helpful, it seems it goes wrong rather > often. That doesn't match my experience. The errors that mention a specific gr

[Bug c++/113839] misleading syntax error message

2024-02-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 --- Comment #4 from Jonathan Wakely --- (In reply to Marek Polacek from comment #2) > Confirmed; we should say that we expect an id there. $ clang++ s.cc s.cc:3:14: error: expected unqualified-id static int { }; ^ 1 error generat

[Bug c++/113839] misleading syntax error message

2024-02-08 Thread f.heckenbach--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 --- Comment #3 from Frank Heckenbach --- > Except C++ parsing does not allow for that because C++ parsing requires > unlimited look ahead. While that's true in general, I think in specific cases (including most real-world cases), the look-ahead

[Bug c++/113839] misleading syntax error message

2024-02-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 Marek Polacek changed: What|Removed |Added Last reconfirmed||2024-02-08 CC|

[Bug c++/113839] misleading syntax error message

2024-02-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113839 --- Comment #1 from Andrew Pinski --- > I'd prefer if gcc (by default, or at least optional) would limit itself to > reporting actual errors if and when they occur. Except C++ parsing does not allow for that because C++ parsing requires unlimi