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/44854] New: Improve diagnostic for missing member name or ';' in a struct


Testcase:
struct foo { int };

gcc-4.6:
test.c:1:18: error: expected identifier or ?(? before ?}? token
test.c:1:18: error: expected specifier-qualifier-list at end of input

clang:
test.c:1:18: error: expected member name or ';' after declaration specifiers
struct foo { int };
             ~~~ ^

Clang knows what you mean and the diagnostic message is better.


-- 
           Summary: Improve diagnostic for missing member name or ';' in a
                    struct
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pzhao at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44854


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