X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=parsetest%2FMS%2Fdeclspec.c;h=b702a53be0bf1af3cf72516ebeb0fa331721daa5;hb=0cea06d0229bb7fc17ecf428f6d51e12ed41c88b;hp=910ea6e8341e9185abbaa94770e54b7f07c0bd18;hpb=5c804a26fbf22e58afedba1551d31f63d81d4d84;p=cparser diff --git a/parsetest/MS/declspec.c b/parsetest/MS/declspec.c index 910ea6e..b702a53 100644 --- a/parsetest/MS/declspec.c +++ b/parsetest/MS/declspec.c @@ -1,9 +1,18 @@ +#include "declspec.h" + +int test2(void) { + return 0; +} + int __declspec(align(4)) x; int __declspec(dllimport) y; int __declspec(dllexport, align(4)) z; -int __declspec(noinline, naked, deprecated("Mist"))func(void); +int __declspec(noinline, naked, deprecated("Mist"))func(void) +{ + return 42; +} struct x { int __declspec(property(get=get_a, put=put_a)) a; @@ -11,3 +20,16 @@ struct x { __declspec(restrict) char * malloc_like(); int __declspec(noalias) test1(void *a, void *b); + +void test3(void) { + test2(); + func(); +} + +__declspec(deprecated) int (*ptr)(void) = ****test2; + +int main(void) { + int x = ptr(); + printf("%I64d\n", x); + return x; +}