https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455

--- Comment #21 from Jens Gustedt <jens.gustedt at inria dot fr> ---
I would be much happier with a generic operator that makes any object into an
rvalue. One way that comes close would be `1 ? (X) : (X)`. This is an
expression that transforms any expression `X` that is not a narrow integer type
into an rvalue. 

Unfortunately it is too ugly that anybody ever will systematically write
`__typeof__(1?(X):(X))`. But a macro

#define __typeof_unqual__(X) __typeof__(1?(X):(X))

could do. (And one could fix the finite number of cases that are not covered
with `_Generic`.)

I'd like to have prefix `+` for that. This could be useful in `__typeof__` but
also in `_Generic`. Maybe gcc could extend that operator to be applicable to
all types.

Reply via email to