Ted Bullock <[email protected]> writes:

> I've been curious about this for a long time; Would using
> const uint16_t or uint32_t instead of proprocessor defines also make
> sense anyway if the purpose is to stop the compiler from being
> mysterious with implicit data types? I've never seen a compelling reason
> to use defines when const variables get a degree of type protection and
> misuse gets caught by the compiler much more quickly.

Since it's possible to take the address of a const variable, it needs to
have a place where the value is stored (and only once!). It's also not
always easy to pinpoint the exact type, so such changes are not low
effort.

Thanks
Greg

Reply via email to