https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97702
--- Comment #2 from Martin Uecker <uecker at eecs dot berkeley.edu> ---
Thank you for the explanation.
Interestingly, from the following list, the only example that
removes the cast is the last one (which seems correct
as ISO C specifies casts to produce a value with the
unqualified type, for whatever reason).
#define T1(x) ((void)0,x)
#define T2(x) (+x)
#define T3(x) (-x)
#define T4(x) (1?x:x)
#define T5(x) (*&(x))
#define T6(x) ((const int)x)
int f(void)
{
const int j = 0;
__typeof__(T6(j)) i = 0;
i = 0;
return i;
}