I would like to define a macro which will also check limits on its arguments. For example:
typedef unsigned char Byte;
#define BQDATA 3
#define MAX_BQ_SIZE (255-BQDATA)
#define BQ(SIZE,NAME) \
#if SIZE > MAX_BQ_SIZE \
#error BQ NAME exceeds maximum size \
#endif \
Byte NAME[BQDATA+SIZE+1] = {BQDATA,BQDATA,BQDATA+SIZE}
So that if it encounters:
BQ(300,bigq);
It would flag the error.