avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Re: issues with struct and volatile


From: Bob Paddock
Subject: Re: [avr-gcc-list] Re: issues with struct and volatile
Date: Fri, 24 Jul 2009 09:47:33 -0400

On Fri, Jul 24, 2009 at 3:59 AM, David Brown<address@hidden> wrote:

> The principle is right, the details are wrong.  You want:
>
>        uint8_t * volatile tx_tail;
>
> These things are so very easy to get wrong that I always use typedefs:
>
>        typedef uint8_t * pUint8_t;
>        volatile pUint8_t tx_tail;
>
> That way there is no room for confusion or error.


There is always the 'cdecl' program that does
 English <--> C/C++ declarations translations.

ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/cdecl-2.5.tar.gz
ftp://ftp.delorie.com/pub/djgpp/current/v2apps/cdecl25b.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2apps/cdecl25s.zip

cdecl> explain volatile *x
declare x as pointer to volatile int

cdecl> explain int volatile *x
declare x as volatile pointer to int

Maybe cdecl could be included in WinAVR?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]