diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
commit | 53992adde3eda3ccf9da63bc7e45673f043de18f (patch) | |
tree | 3558f327a6f9ab59c5d7a06528d84e1560445247 /test/Sema/init.c | |
parent | 7e411337c0ed226dace6e07f1420486768161308 (diff) | |
download | FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.zip FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.tar.gz |
Update clang to r104832.
Diffstat (limited to 'test/Sema/init.c')
-rw-r--r-- | test/Sema/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Sema/init.c b/test/Sema/init.c index b9867cf..c2c29ad 100644 --- a/test/Sema/init.c +++ b/test/Sema/init.c @@ -131,3 +131,17 @@ const wchar_t widestr[] = L"asdf"; // PR5447 const double pr5447 = (0.05 < -1.0) ? -1.0 : 0.0499878; +// PR4386 + +// None of these are constant initializers, but we implement GCC's old +// behaviour of accepting bar and zed but not foo. GCC's behaviour was +// changed in 2007 (rev 122551), so we should be able to change too one +// day. +int PR4386_bar(); +int PR4386_foo() __attribute((weak)); +int PR4386_zed(); + +int PR4386_a = ((void *) PR4386_bar) != 0; +int PR4386_b = ((void *) PR4386_foo) != 0; // expected-error{{initializer element is not a compile-time constant}} +int PR4386_c = ((void *) PR4386_zed) != 0; +int PR4386_zed() __attribute((weak)); |