this post was submitted on 11 Feb 2025
232 points (95.0% liked)

Programmer Humor

22873 readers
709 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 2 months ago (1 children)

Should ≠ Needs to

You can do it, and it will work, but it's unclean and not best-practice. I wouldn't be surprised if it's undefined behaviour.

[–] [email protected] 22 points 2 months ago

Just to clarify. It is defined behavior - there's plenty of undefined behavior in C but that ain't one of them.