[Bug c/44854] New: Improve diagnostic for missing member name or ';' in a struct

pzhao at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 7 07:15:00 GMT 2010


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



More information about the Gcc-bugs mailing list