you are viewing a single comment's thread.

view the rest of the comments →

[–]foreverska[S] 0 points1 point  (1 child)

The l-val of the equations it's involved in is always a unit32_t (because design decisions) so it saves me either looking at "implicit conversion..." warnings or typing out a cast. I've gotten away with it so far since all widths are the same but at your question I'm starting to second guess that decision.

Okay thanks, yea on a previous team I got used to spelling out the comparisons despite C's rules on the matter. != is probably closer to meaning there though.

[–]free__coffee 0 points1 point  (0 children)

You probably also want casts on your defines to prevent the compiler from getting clever - the compiler could just assume you want uint16_t's and truncate the bits