freebsd-dev/test/Parser/pragma-weak.c

18 lines
699 B
C
Raw Normal View History

2009-06-06 08:21:31 +00:00
// RUN: clang-cc -fsyntax-only -verify %s
// Note that this puts the expected lines before the directives to work around
// limitations in the -verify mode.
int x;
/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak
#pragma weak x
extern int z;
/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = =
/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z =
2009-10-14 18:03:49 +00:00
/* expected-warning {{weak identifier 'y' never declared}} */ #pragma weak z = y
2009-06-06 08:21:31 +00:00
extern int a;
/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a b
/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a = x c