public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/116771] New: Missing suggestion on mispelled class name Date: Wed, 18 Sep 2024 20:08:51 +0000 [thread overview] Message-ID: <bug-116771-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116771 Bug ID: 116771 Summary: Missing suggestion on mispelled class name Product: gcc Version: unknown Status: UNCONFIRMED Keywords: easyhack Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- I made this typo in C++: class layout_printer { void print_newline (); }; void layout_pirnter::print_newline () { } and noticed that we don't yet issue a suggestion for the missppelled class name: <source>:7:1: error: 'layout_pirnter' has not been declared 7 | layout_pirnter::print_newline () | ^~~~~~~~~~~~~~ Compiler returned: 1 whereas clang does: <source>:7:1: error: use of undeclared identifier 'layout_pirnter'; did you mean 'layout_printer'? 7 | layout_pirnter::print_newline () | ^~~~~~~~~~~~~~ | layout_printer <source>:1:7: note: 'layout_printer' declared here 1 | class layout_printer | ^ <source>:7:1: error: use of undeclared identifier 'layout_pirnter'; did you mean 'layout_printer'? 7 | layout_pirnter::print_newline () | ^~~~~~~~~~~~~~ | layout_printer <source>:1:7: note: 'layout_printer' declared here 1 | class layout_printer | ^ 2 errors generated. Compiler returned: 1 See https://godbolt.org/z/q968ePqq9 I'm not sure why clang emits two errors, but that's for them to fix. In the meantime, we should provide a suggestion for the misspelling.
next reply other threads:[~2024-09-18 20:08 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-09-18 20:08 dmalcolm at gcc dot gnu.org [this message] 2024-09-18 20:11 ` [Bug c++/116771] " pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-116771-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).