30 lines · cpp
1// RUN: %clang_cc1 -verify %s2 3#define P_10(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,4#define P_100(x) P_10(x##0) P_10(x##1) P_10(x##2) P_10(x##3) P_10(x##4) \5 P_10(x##5) P_10(x##6) P_10(x##7) P_10(x##8) P_10(x##9)6#define P_1000(x) P_100(x##0) P_100(x##1) P_100(x##2) P_100(x##3) P_100(x##4) \7 P_100(x##5) P_100(x##6) P_100(x##7) P_100(x##8) P_100(x##9)8#define P_10000(x) P_1000(x##0) P_1000(x##1) P_1000(x##2) P_1000(x##3) P_1000(x##4) \9 P_1000(x##5) P_1000(x##6) P_1000(x##7) P_1000(x##8) P_1000(x##9)10 11void func (12 P_10000(int p)13 P_10000(int q)14 P_10000(int r)15 P_10000(int s)16 P_10000(int t)17 P_10000(int u)18 P_10000(int v) // expected-error {{too many function parameters; subsequent parameters will be ignored}}19 int w);20 21extern double(*func2)(22 P_10000(int p)23 P_10000(int q)24 P_10000(int r)25 P_10000(int s)26 P_10000(int t)27 P_10000(int u)28 P_10000(int v) // expected-error {{too many function parameters; subsequent parameters will be ignored}}29 int w);30