Not sure that I'm following ya Sebastiani. Here is the actual code I used to test (minus the other combos).
Code:
#include <stdio.h>
void print(int, char*, int, int);
void test7(int*);
void test8(int*);
int main (void)
{
int x=4;
printf("\nR -> R\t%d\n",x);
test7(&x);
printf("At end: %d\n", x);
}
void print(int a, char* s, int b, int c)
{
printf("test%d %s test%d : %d\n", a, s, b, c);
}
void test7(int* x)
{
print(7, "Before Inc", 7, (int) *x);
++(*x);
print(7, "Before", 8, (int) *x);
test8(&*x);
print(7, "After", 8, (int) *x);
}
void test8(int* x)
{
print(8, "Before Inc", 8, (int) *x);
++(*x);
print(8, "After Inc", 8, (int) *x);
}
Which gave me the output of:
Code:
R -> R 4
test7 Before Inc test7 : 4
test7 Before test8 : 5
test8 Before Inc test8 : 5
test8 After Inc test8 : 6
test7 After test8 : 6
At end: 6
This to me seems to indicate that it works.
I've tried test8(&x) and test(*x) and I always get a compile error.