[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 --- Comment #7 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:eb9f099c3df2b1b4c5fb0fa25cfdfa3cb5fc817e commit r12-3869-geb9f099c3df2b1b4c5fb0fa25cfdfa3cb5fc817e Author: Michel Morin Date: Thu Sep 16 23:29:54 2021 +0900 c++: add spellcheck suggestions for typedef etc. [PR77565] cp_keyword_starts_decl_specifier_p misses many keywords that can start decl-specifiers. This patch adds support for those keywords. PR c++/77565 gcc/cp/ChangeLog: * parser.c (cp_keyword_starts_decl_specifier_p): Handle more decl-specifiers (typedef/inline/cv/explicit/virtual/friend). gcc/testsuite/ChangeLog: * g++.dg/spellcheck-pr77565.C: New test.
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 David Malcolm changed: What|Removed |Added CC||dmalcolm at gcc dot gnu.org --- Comment #6 from David Malcolm --- Patch discussion: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579354.html
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 --- Comment #5 from Michel Morin --- Confirmed the fix. Will send a patch to ML. > I had use -std=c++98 This comment helps me a lot to understand what's going on. Thanks!
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 --- Comment #4 from Michel Morin --- It seems that the reason is: `cp_keyword_starts_decl_specifier_p` in `cp/parser.c` does not include `RID_TYPENAME`. Note that `typedef` is a decl-specifier ([dcl.spec] p.1 in the Standard).
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 --- Comment #3 from Michel Morin --- There is a typo in this PR's Description. Here is a more readable one: When we enable `typeof` GCC extension (e.g. using `-std=gnu++**` options), we get strange did-you-mean suggestions. `typdef int Int;` -> error: 'typdef' does not name a type; did you mean 'typeof'? `typedeff int Int;` -> error: 'typedeff' does not name a type; did you mean 'typeof'? Confirmed on GCC 11.2.
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2016-09-12 00:00:00 |2021-8-9 --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > We don't give any suggestion any more: Never mind, I had use -std=c++98 with -std=gnu++98, get: :1:1: error: 'typdef' does not name a type; did you mean 'typeof'? 1 | typdef int Int; | ^~ | typeof
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 --- Comment #1 from Andrew Pinski --- We don't give any suggestion any more: :1:1: error: 'typdef' does not name a type typdef int Int; ^~
[Bug c++/77565] `typdef int Int;` --> did you mean `typeof`?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-09-12 Ever confirmed|0 |1