diff options
Diffstat (limited to 'test/manual/cedet/tests/testsppcomplete.c')
-rw-r--r-- | test/manual/cedet/tests/testsppcomplete.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/manual/cedet/tests/testsppcomplete.c b/test/manual/cedet/tests/testsppcomplete.c new file mode 100644 index 00000000000..d7899942285 --- /dev/null +++ b/test/manual/cedet/tests/testsppcomplete.c @@ -0,0 +1,30 @@ +/* Example provided by Hannes Janetzek */ + +struct Test { int test; }; + +#define BLA(_type) \ + _type *bla = (_type*) malloc(sizeof(_type)); + +#define BLUB(_type) \ + (_type*)malloc(sizeof(_type)); + +#define FOO(_type) \ + _type *foo = BLUB(_type); + +#define BAR(_type) \ + _type *bar = (*_type)BLUB(_type); + +int main(int argc, char *argv[]) { + BLA(Test); + bla->// -1- + ; // #1# ( "test" ) + + FOO(Test); + foo->// -2- + ; // #2# ( "test" ) + + BAR(Test); + bar->// -3- + ; // #3# ( "test" ) +} + |