Skip to content

Commit 702adfd

Browse files
committed
Turn the error on anonymous structs/unions into a warning.
Otherwise we get too many errors on glibc's standard headers. A real error will occur when the anonymous struct/union is accessed.
1 parent 9622c47 commit 702adfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cparser/Elab.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ and elab_field_group env (Field_group (spec, fieldlist, loc)) =
640640
error loc "non-default storage in struct or union";
641641
if fieldlist = [] then
642642
if is_anonymous_composite spec then
643-
error loc "ISO C99 does not support anonymous structs/unions"
643+
warning loc "ISO C99 does not support anonymous structs/unions"
644644
else
645645
warning loc "declaration does not declare any members";
646646

0 commit comments

Comments
 (0)