[Bug c++/77565] New: `typdef int Int;` --> did you mean `typeof`?

mimomorin at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 12 12:30:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77565

            Bug ID: 77565
           Summary: `typdef int Int;` --> did you mean `typeof`?
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mimomorin at gmail dot com
  Target Milestone: ---

Compiling `typdef int Int;` on gcc 7.0.0 (20160904) gives this message: 
  error: 'typedeff' does not name a type; did you mean 'typeof'?
I would expect "did you mean 'typedef'?", instead.

Note that the edit distance between `typdef` and `typedef` is smaller than the
one between `typdef` and `typeof`. So I think it's a bit strange that the
compiler suggests `typeof`.


More information about the Gcc-bugs mailing list