this post was submitted on 25 Mar 2024
529 points (98.7% liked)

Programmer Humor

19103 readers
1119 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 5 months ago* (last edited 5 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.

[–] QuaternionsRock 1 points 5 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.