r/programminghumor • • Feb 11 '26

Array is syntax error

Post image
444 Upvotes

46 comments sorted by

View all comments

Show parent comment

2

u/realestLink Feb 12 '26

To elaborate, C does not guarantee that type punning through a union will work, but it also doesn't affirmatively mark it as UB. It is implementation defined/unspecified with most compilers supporting it on most platforms. The technical term is "IB with possible trap" iirc