This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Preserve volatileness, fix PR32721


Diego Novillo writes:
 > On 7/13/07 9:01 AM, Andreas Schwab wrote:
 > 
 > > If you want a volatile pointer, you write `int *volatile x'.
 > 
 > Yeah, I always get these reversed.  Thanks.

cdecl is your friend.

~ $ cdecl 
Type `help' or `?' for help
cdecl> explain int *volatile x
declare x as volatile pointer to int
cdecl> explain volatile int *x
declare x as pointer to volatile int
cdecl> explain int (*(*(*b)())(int (*(*)())()))()
declare b as pointer to function returning pointer to function (pointer to function returning pointer to function returning int) returning pointer to function returning int

:-)

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]