This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/82013] New: better error message for missing semicolon in prototype


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

            Bug ID: 82013
           Summary: better error message for missing semicolon in
                    prototype
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andi-gcc at firstfloor dot org
  Target Milestone: ---

gcc gives quite poor error messages when forgetting a semicolon after a
prototype (common mistake when cut'n'pasting a function definition into a
header)

It's especially confusing when the prototype is the last in the include file,
because then the errors appear in another file.

As a minimum it should warn about a missing semicolon at the end of a file.

Possibly this could be also used for fix-it, but that's likely more
complicated.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]