Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/cwsc0.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ #include <stddef.h> void foo(void); void test(int (*f)(void), char *p) { __builtin_call_with_static_chain(f(), p); __builtin_call_with_static_chain(p, f()); /* { dg-error "must be a call" } */ __builtin_call_with_static_chain(f() + 1, p); /* { dg-error "must be a call" } */ __builtin_call_with_static_chain(f(), 0); /* { dg-error "must be a pointer" } */ __builtin_call_with_static_chain(f(), NULL); __builtin_call_with_static_chain(foo, p); /* { dg-error "must be a call" } */ __builtin_call_with_static_chain(foo(), p); __builtin_call_with_static_chain(foo(), foo); }