In a macro I would want to make the value the same width, however unsigned. So, a natural unsigned typeof(x) came to mind. However, it doesn't compile:
/home/guest/mc.c: In function ‘main’:
/home/guest/mc.c:14:36: error: expected ‘)’ before ‘typeof’
14 | *((unsigned typeof(minus)*)&minus));
I wonder why it is so? Maybe I'm doing something wrong? Can I somehow add unsigned to the type of a variable?
PS. I've noted, that similar cast adding const works OK:
#define add_const(x) ((const typeof(x))(x))
Also, adding * to create a pointer type also works OK.