this post was submitted on 25 Mar 2024
542 points (98.6% liked)

Programmer Humor

19689 readers
98 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 23 points 8 months ago* (last edited 8 months ago) (1 children)

They do in embedded when you are polling a read only register. The cpu can change the register but writing to it does nothing.

[–] [email protected] 1 points 8 months ago

That seems like a better fit for an intrinsic, doesn’t it? If it truly is a register, then referencing it through a (presumably global) variable doesn’t semantically align with its location, and if it’s a special memory location, then it should obviously be referenced through a pointer.