Re: Delay Routine: Fully-portable C89 if possible
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 11 Oct 2007 09:43:49 +0100
"David Brown" <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:470ccdb0$0$3218$8404b019@xxxxxxxxxxxxxxxxxx
John Devereux wrote:<snip>
David Brown <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
First off, I don't use printf or friends very often (I write small
embedded systems). Secondly, if I *do* use printf (more likely
snprintf), I use gcc which will type-check the parameters against the
format so that any mistakes are caught - although with any variable
parameter function, you've lost much of C's already limited type
checking. Thirdly, I occasionally have to cast the parameters
explicitly so that I can be sure there are no mistakes.
Doesn't that imply a whole new set of things to worry about?
I would not say so, no.
I've come a cropper using gcc for ARM by passing an integer to a sprintf
that was expecting float. Caused my system to reset and took quite a
long time to find.
.
- Follow-Ups:
- Re: Delay Routine: Fully-portable C89 if possible
- From: David Brown
- Re: Delay Routine: Fully-portable C89 if possible
- References:
- Delay Routine: Fully-portable C89 if possible
- From: Martin Wells
- Re: Delay Routine: Fully-portable C89 if possible
- From: David Brown
- Re: Delay Routine: Fully-portable C89 if possible
- From: Martin Wells
- Re: Delay Routine: Fully-portable C89 if possible
- From: John Devereux
- Re: Delay Routine: Fully-portable C89 if possible
- From: David Brown
- Re: Delay Routine: Fully-portable C89 if possible
- From: John Devereux
- Re: Delay Routine: Fully-portable C89 if possible
- From: David Brown
- Re: Delay Routine: Fully-portable C89 if possible
- From: John Devereux
- Re: Delay Routine: Fully-portable C89 if possible
- From: David Brown
- Delay Routine: Fully-portable C89 if possible
- Prev by Date: Re: PIC controller for a motor (PWM)
- Next by Date: Re: Delay Routine: Fully-portable C89 if possible
- Previous by thread: Re: Delay Routine: Fully-portable C89 if possible
- Next by thread: Re: Delay Routine: Fully-portable C89 if possible
- Index(es):
Relevant Pages
|