07-01-2025, 08:31 PM
@misracpp does my above clarification change your view on the issue?
I also note that rule 7.0.5 does have an exception for constant non-negative signed values that are converted to unsigned:
> A compile-time constant with signed integral type that has a non-negative value may be converted to an unsigned type through the usual arithmetic conversions.
Would it be reasonable to apply the same exception for 7.0.4?
I also note that rule 7.0.5 does have an exception for constant non-negative signed values that are converted to unsigned:
> A compile-time constant with signed integral type that has a non-negative value may be converted to an unsigned type through the usual arithmetic conversions.
Would it be reasonable to apply the same exception for 7.0.4?