Subject: Re: __UNCONST(a)
To: None <mouse@Rodents.Montreal.QC.CA>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 07/02/2004 12:00:18
> >>> #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
> >> Why cast to a specific type?
> > because it's only sane way without typeof().
>
> What's insane about just making it produce a void *?
- in most cases, what you want is a specific type, isn't it?
- it strips out other qualifiers like volatile.
(typeof() isn't enough for this either.)
YAMAMOTO Takashi