summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/trad/funlike-5.c
blob: f60a6ea7865dc3fd658e53f42422917f10d50db5 (plain)
1
2
3
4
5
6
7
8
9
10
/* Test function like macro. */
/* Contributed by Devang Patel <dpatel@apple.com> */

/* {do-do preprocess } */
/* { dg-options "-traditional-cpp -E -dD" } */
int     __srget (char *);
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
#define getc(fp)        __sgetc(fp)
#define getchar()       getc(stdin)