I was trying to define a general function to take input using _Generic in C, This is what I wrote
#include <stdio.h>
#define readlong(x) scanf("%lld",&x);
#define read(x) scanf("%lld",&x);
#define scan(x) _Generic((x), \
long long: readlong, \
default: read \
)(x)
but when I compile it using gcc test.c -std=C11
on gcc 5.3.0, I get error:
error: 'readlong' undeclared (first use in this function)