gcc/
[official-gcc.git] / gcc / testsuite / c-c++-common / pr36513.c
blob026325410a10c1da034de7942247640b4f1b362c
1 /* PR 36513: -Wlogical-op warns about strchr */
2 /* { dg-do compile } */
3 /* { dg-options "-Wlogical-op" } */
5 extern void *__rawmemchr (const void *__s, int __c);
6 int main1 ()
8 char *s, t;
9 (__extension__ (__builtin_constant_p (t)
10 && !__builtin_constant_p (s)
11 && (t) == '\0'
12 ? (char *) __rawmemchr (s, t)
13 : __builtin_strchr (s, t)));