Skip to content

Commit

Permalink
Turn the error on anonymous structs/unions into a warning.
Browse files Browse the repository at this point in the history
Otherwise we get too many errors on glibc's standard headers.
A real error will occur when the anonymous struct/union is accessed.
  • Loading branch information
xavierleroy committed Jun 11, 2015
1 parent 9622c47 commit 702adfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cparser/Elab.ml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ and elab_field_group env (Field_group (spec, fieldlist, loc)) =
error loc "non-default storage in struct or union";
if fieldlist = [] then
if is_anonymous_composite spec then
error loc "ISO C99 does not support anonymous structs/unions"
warning loc "ISO C99 does not support anonymous structs/unions"
else
warning loc "declaration does not declare any members";

Expand Down

0 comments on commit 702adfd

Please sign in to comment.