0

Suppose I have the following types:

typedef uint8 (*P2MyFunc)(void);

typedef struct
{
    P2MyFunc ptr;
}MyStruct;

Given an instance inst of MyStruct. is there any difference at all between the following calls ?

(*inst.ptr)();
inst.ptr();

Both seem to work just fine but the first one might be prone to compiler warnings.

Sterpu Mihai
  • 486
  • 1
  • 4
  • 15

1 Answers1

0

They mean the exact same thing according to the C Standard. You could even go a step further. The following below give the same result:

(********inst.ptr)();
inst.ptr();
schmidt73
  • 181
  • 11