freebsd-dev/test/Sema/implicit-int.c

33 lines
689 B
C
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic
2009-06-02 17:58:47 +00:00
foo() { // expected-warning {{type specifier missing, defaults to 'int'}}
2009-10-14 18:03:49 +00:00
return 0;
2009-06-02 17:58:47 +00:00
}
y; // expected-warning {{type specifier missing, defaults to 'int'}}
// rdar://6131634
void f((x)); // expected-warning {{type specifier missing, defaults to 'int'}}
// PR3702
#define PAD(ms10) { \
2009-10-14 18:03:49 +00:00
register i; \
2009-06-02 17:58:47 +00:00
}
2009-10-14 18:03:49 +00:00
#define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */
2009-06-02 17:58:47 +00:00
void
h19_insline(n) // expected-warning {{parameter 'n' was not declared, defaulting to type 'int'}}
{
2009-10-14 18:03:49 +00:00
ILPAD(); // expected-warning {{type specifier missing, defaults to 'int'}}
2009-06-02 17:58:47 +00:00
}
struct foo {
2009-10-14 18:03:49 +00:00
__extension__ __attribute__((packed)) x : 4;
2009-06-02 17:58:47 +00:00
};