public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21038] report unmatched brace as a note
[not found] <bug-21038-4@http.gcc.gnu.org/bugzilla/>
@ 2011-10-22 14:28 ` manu at gcc dot gnu.org
2011-10-22 19:58 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-22 14:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21038
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
Summary|Poor diagnostic |report unmatched brace as a
| |note
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-22 14:27:48 UTC ---
Clang:
/tmp/webcompile/_32245_0.cc:5:11: error: expected '}'
int k;
^
/tmp/webcompile/_32245_0.cc:1:12: note: to match this '{'
void foo() {
^
1 error generated.
In the worst case, it will tell you from which point you should start looking.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/21038] report unmatched brace as a note
[not found] <bug-21038-4@http.gcc.gnu.org/bugzilla/>
2011-10-22 14:28 ` [Bug c++/21038] report unmatched brace as a note manu at gcc dot gnu.org
@ 2011-10-22 19:58 ` redi at gcc dot gnu.org
2023-04-15 13:26 ` xry111 at gcc dot gnu.org
2023-04-16 1:24 ` [Bug c/21038] " egallager at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-10-22 19:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21038
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-22 19:57:45 UTC ---
Using an editor that can jump between braces (e.g. % in vim) makes it trivial
to find if you've indented your code sensibly. As Andrew said in comment 1, the
compiler's hint might be completely misleading.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/21038] report unmatched brace as a note
[not found] <bug-21038-4@http.gcc.gnu.org/bugzilla/>
2011-10-22 14:28 ` [Bug c++/21038] report unmatched brace as a note manu at gcc dot gnu.org
2011-10-22 19:58 ` redi at gcc dot gnu.org
@ 2023-04-15 13:26 ` xry111 at gcc dot gnu.org
2023-04-16 1:24 ` [Bug c/21038] " egallager at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-04-15 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21038
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xry111 at gcc dot gnu.org
--- Comment #6 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
With latest GCC, it works for C++:
LANG= g++ t.c
t.c: In function 'void foo()':
t.c:4:11: error: expected '}' at end of input
4 | int k;
| ^
t.c:1:12: note: to match this '{'
1 | void foo() {
| ^
But it's sometimes indeed completely misleading (PR109356).
Still does not work for C:
LANG= cc t.c
t.c: In function 'foo':
t.c:4:5: error: expected declaration or statement at end of input
4 | int k;
| ^~~
Can we close this or reset Component field?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/21038] report unmatched brace as a note
[not found] <bug-21038-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2023-04-15 13:26 ` xry111 at gcc dot gnu.org
@ 2023-04-16 1:24 ` egallager at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-04-16 1:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21038
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |c
CC| |egallager at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=109356
--- Comment #7 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #6)
> Can we close this or reset Component field?
Component field reset.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-16 1:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-21038-4@http.gcc.gnu.org/bugzilla/>
2011-10-22 14:28 ` [Bug c++/21038] report unmatched brace as a note manu at gcc dot gnu.org
2011-10-22 19:58 ` redi at gcc dot gnu.org
2023-04-15 13:26 ` xry111 at gcc dot gnu.org
2023-04-16 1:24 ` [Bug c/21038] " egallager at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).