public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104806] New: Weird error message: did you mean "__dt "
@ 2022-03-06 13:15 jengelh at inai dot de
2022-03-06 20:53 ` [Bug c++/104806] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: jengelh at inai dot de @ 2022-03-06 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
Bug ID: 104806
Summary: Weird error message: did you mean "__dt "
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jengelh at inai dot de
Target Milestone: ---
Input
=====
struct S{};
int main() { S s; s.__d; }
Observed
========
g++ -c x.cpp
gcc version 11.2.1 20220103 [revision d4a1d3c4b377f1d4acb34fe1b55b5088a3f293f6]
(SUSE Linux)
x.cpp: In function ‘int main()’:
x.cpp:2:21: error: ‘struct S’ has no member named ‘__d’; did you mean ‘__dt ’?
2 | int main() { S s; s.__d; }
| ^~~
| __dt
Expected
========
x.cpp: did you mean "__dt"?
That is, without the extra space. In addition, where does __dt come from? I
have not even included anything. This in the source code git repo looks like
the culprit.
gcc/cp/decl.cc: {"__dt ", &dtor_identifier, cik_dtor},
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
@ 2022-03-06 20:53 ` pinskia at gcc dot gnu.org
2022-03-07 8:56 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-06 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually "__dt " should not be recommended at all.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
2022-03-06 20:53 ` [Bug c++/104806] " pinskia at gcc dot gnu.org
@ 2022-03-07 8:56 ` rguenth at gcc dot gnu.org
2022-03-07 9:50 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-07 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-03-07
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Version|unknown |12.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
2022-03-06 20:53 ` [Bug c++/104806] " pinskia at gcc dot gnu.org
2022-03-07 8:56 ` rguenth at gcc dot gnu.org
@ 2022-03-07 9:50 ` jakub at gcc dot gnu.org
2022-03-08 20:43 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-07 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52572
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52572&action=edit
gcc12-pr104806.patch
Untested fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
` (2 preceding siblings ...)
2022-03-07 9:50 ` jakub at gcc dot gnu.org
@ 2022-03-08 20:43 ` cvs-commit at gcc dot gnu.org
2022-03-08 20:46 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-08 20:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:e480c3c06d20874fd7504bfdcca0b829f8000389
commit r12-7544-ge480c3c06d20874fd7504bfdcca0b829f8000389
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 8 21:41:21 2022 +0100
c++: Don't suggest cdtor or conversion op identifiers in spelling hints
[PR104806]
On the following testcase, we emit "did you mean '__dt '?" in the error
message. "__dt " shows there because it is dtor_identifier, but we
shouldn't suggest those to the user, they are purely internal and can't
be really typed by the user because of the final space in it.
2022-03-08 Jakub Jelinek <jakub@redhat.com>
PR c++/104806
* search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
identifiers with space at the end.
* g++.dg/spellcheck-pr104806.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
` (3 preceding siblings ...)
2022-03-08 20:43 ` cvs-commit at gcc dot gnu.org
@ 2022-03-08 20:46 ` jakub at gcc dot gnu.org
2022-03-29 5:53 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-08 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
` (4 preceding siblings ...)
2022-03-08 20:46 ` jakub at gcc dot gnu.org
@ 2022-03-29 5:53 ` cvs-commit at gcc dot gnu.org
2022-05-10 8:25 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:25 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-29 5:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:b7c0962d0c7882b8c019363257c8b632d6c11d5e
commit r11-9725-gb7c0962d0c7882b8c019363257c8b632d6c11d5e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 8 21:41:21 2022 +0100
c++: Don't suggest cdtor or conversion op identifiers in spelling hints
[PR104806]
On the following testcase, we emit "did you mean '__dt '?" in the error
message. "__dt " shows there because it is dtor_identifier, but we
shouldn't suggest those to the user, they are purely internal and can't
be really typed by the user because of the final space in it.
2022-03-08 Jakub Jelinek <jakub@redhat.com>
PR c++/104806
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
identifiers with space at the end.
* g++.dg/spellcheck-pr104806.C: New test.
(cherry picked from commit e480c3c06d20874fd7504bfdcca0b829f8000389)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
` (5 preceding siblings ...)
2022-03-29 5:53 ` cvs-commit at gcc dot gnu.org
@ 2022-05-10 8:25 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:25 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 8:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:da83eb387b2e0e4dfab73b735beac87ed269c866
commit r10-10692-gda83eb387b2e0e4dfab73b735beac87ed269c866
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 8 21:41:21 2022 +0100
c++: Don't suggest cdtor or conversion op identifiers in spelling hints
[PR104806]
On the following testcase, we emit "did you mean '__dt '?" in the error
message. "__dt " shows there because it is dtor_identifier, but we
shouldn't suggest those to the user, they are purely internal and can't
be really typed by the user because of the final space in it.
2022-03-08 Jakub Jelinek <jakub@redhat.com>
PR c++/104806
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
identifiers with space at the end.
* g++.dg/spellcheck-pr104806.C: New test.
(cherry picked from commit e480c3c06d20874fd7504bfdcca0b829f8000389)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/104806] Weird error message: did you mean "__dt "
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
` (6 preceding siblings ...)
2022-05-10 8:25 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:25 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 6:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104806
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2a829a4e85ead3e6dff64fe5a8d465cfdf88f3d2
commit r9-10138-g2a829a4e85ead3e6dff64fe5a8d465cfdf88f3d2
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 8 21:41:21 2022 +0100
c++: Don't suggest cdtor or conversion op identifiers in spelling hints
[PR104806]
On the following testcase, we emit "did you mean '__dt '?" in the error
message. "__dt " shows there because it is dtor_identifier, but we
shouldn't suggest those to the user, they are purely internal and can't
be really typed by the user because of the final space in it.
2022-03-08 Jakub Jelinek <jakub@redhat.com>
PR c++/104806
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
identifiers with space at the end.
* g++.dg/spellcheck-pr104806.C: New test.
(cherry picked from commit e480c3c06d20874fd7504bfdcca0b829f8000389)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-11 6:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06 13:15 [Bug c++/104806] New: Weird error message: did you mean "__dt " jengelh at inai dot de
2022-03-06 20:53 ` [Bug c++/104806] " pinskia at gcc dot gnu.org
2022-03-07 8:56 ` rguenth at gcc dot gnu.org
2022-03-07 9:50 ` jakub at gcc dot gnu.org
2022-03-08 20:43 ` cvs-commit at gcc dot gnu.org
2022-03-08 20:46 ` jakub at gcc dot gnu.org
2022-03-29 5:53 ` cvs-commit at gcc dot gnu.org
2022-05-10 8:25 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:25 ` cvs-commit 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).