jmp_buf as an incomplete array typeAuthors: Jay Ghiron
Date: 2026-03-03
Submitted against: C23
Status: Open
No wording exists currently to say that jmp_buf must be a complete
object type:
The type declared is
jmp_bufwhich is an array type suitable for holding the information needed to restore a calling environment.
(C23 7.13.1 "Non-local jumps" paragraph 3.)
If jmp_buf were an incomplete object type, this would break almost
all uses of it. Interestingly, the example of longjmp in C23
7.13.3.1 paragraph 5 would be fine because it defines an object of
type jmp_buf by using a tentative definition.
Modify C23 7.13.1 paragraph 3:
jmp_bufwhich is a complete object type that is an array type suitable for holding the information needed to restore a calling environment.
Note: This wording is suggested instead of "complete array type" to
clarify that jmp_buf must have a fundamental alignment requirement.