bug-bad-type.c 308 B

12345678910111213141516171819
  1. struct s {
  2. int i;
  3. };
  4. long a;
  5. void foo(void)
  6. {
  7. (struct s) { .i = (foo - a), };
  8. }
  9. /*
  10. * check-name: bug-bad-type
  11. *
  12. * check-error-start
  13. bug-bad-type.c:5:6: warning: symbol 'a' was not declared. Should it be static?
  14. bug-bad-type.c:8:32: error: arithmetics on pointers to functions
  15. * check-error-end
  16. */