[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-08-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #11 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:64028d626a50410dbf29f252a78c7675b35751d6 commit r15-3043-g64028d626a50410dbf29f252a78c7675b35751d6 Author: Franciszek Witt Date:

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #10 from Jonathan Wakely --- Please send the v2 patch to gcc-patches for review, thanks!

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-18 Thread franek.witt at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #9 from Franciszek Witt --- I have implemented the improvement mentioned by Jason and also added the hint about missing comma or operator. This patch fails testsuite/g++.dg/parse/error59.C but it was intended to check for ICE (see PR

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-18 Thread franek.witt at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #8 from Franciszek Witt --- Created attachment 58700 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58700&action=edit [patchv2] improvements to the previous patch

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-09 Thread franek.witt at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #7 from Franciszek Witt --- I believe it might also be worth reporting that a comma or an operator is likely missing in case the braces.require_close failed and the next token is not ';' (this is just a heuristic, some better conditi

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #6 from Jason Merrill --- It seems like the problem is that cp_parser_braced_list doesn't check whether braces.require_close succeeded and compensate if it fails; in that case it might make sense to cp_parser_skip_to_closing_brace a

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-04 Thread franek.witt at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 Franciszek Witt changed: What|Removed |Added CC||franek.witt at gmail dot com --- Comm

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-03 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #4

[Bug c++/101232] Bad error message with stray semicolon in initializer

2024-07-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug c++/101232] Bad error message with stray semicolon in initializer

2021-07-13 Thread tobi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #2 from Tobias Schlüter --- Here's another way to trigger this, inspired by my other PR101435 (https://godbolt.org/z/no6aEqvh3): === template class X { public: U v; using Scalar = U; stati

[Bug c++/101232] Bad error message with stray semicolon in initializer

2021-07-07 Thread tobi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101232 --- Comment #1 from Tobias Schlüter --- BTW an equivalent C example gives the proper error both with C and C++ https://godbolt.org/z/sWc67eWT8 = struct X { int a; int b; }; void f() { struct X x = { 1, 2; }; } ==