#include <stdio.h>
#include <stdlib.h>

#define itype(x) __typeof__(__builtin_choose_expr(sizeof(*(x)) > sizeof(0UL), 0ULL, 0UL))

int main(void)
{
  const char *a;
  const short *b;
  const int *c;
  const long *d;
  const long long *e;
  const void **p;

  itype(a) aa;
  itype(b) bb;
  itype(c) cc;
  itype(d) dd;
  itype(e) ee;
  itype(p) pp;

  aa = 1;
  bb = 2;
  cc = 3;
  dd = 4;
  ee = 5;
  pp = 6;

  printf("a = %zu\n", sizeof(aa));
  printf("b = %zu\n", sizeof(bb));
  printf("c = %zu\n", sizeof(cc));
  printf("d = %zu\n", sizeof(dd));
  printf("e = %zu\n", sizeof(ee));
  printf("p = %zu\n", sizeof(pp));

  return 0;
}