Re: shame on MISRA
- From: Marcin Wolcendorf <wolcendo@xxxxxxxxxxxxxx>
- Date: Sun, 22 Apr 2007 20:26:45 +0000 (UTC)
On Sun, 22 Apr 2007 08:58:18 -0700, Arlet wrote:
On Apr 22, 12:44 pm, Marcin Wolcendorf <wolce...@xxxxxxxxxxxxxx>....
wrote:
No. It doesn't. One of the rules states (I don't have them in front of me),
that you can't use signed constants (like -1U) to set unsigned variables. -1U
is a nice value of all 1s binary, convenient for masking. Well, you can get
Just use ~0U
True :).
I can't recall the reason, why I didn't use it.
M.
.
- Follow-Ups:
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- References:
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- From: Arlet
- Re: shame on MISRA
- Prev by Date: Re: CANbus consultant?
- Next by Date: Re: If ever there is need for MISRA C then this is it!
- Previous by thread: Re: shame on MISRA
- Next by thread: Re: shame on MISRA
- Index(es):
Relevant Pages
|