Menu

#144 C11 static union implicit initialization

Bug
closed-wont-fix
None
5
2014-03-10
2014-03-10
No

C99 says the following about static union implicit initialization: "the first named member is initialized (recursively) according to these
rules."

C11 has added the following to restriction: "and any padding is initialized to zero bits".

CIL follows C99 but not C11 here. The difference is not observable for global variables (since the compiler will fulfill the padding condition anyway), but it will impact local variables with an incomplete initialiazer list. Test-case attached.

Leaving this as wont-fix because we don't plan to support C11.

1 Attachments

Discussion


Log in to post a comment.

MongoDB Logo MongoDB