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

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).