6.2.5
At various points within a translation unit an object type may be incomplete (lacking sufficient information to determine the size of objects of that type).
Also
6.2.5 19) The void type comprises an empty set of values; it is an incomplete object type that cannot be completed.
And
6.5.3.4 The sizeof operator shall not be applied to an expression that has function type or an incomplete type,
But Visual Studio 2010 prints 0
for
printf("Size of void is %d\n",sizeof(void));
My question is 'What are incomplete types
'?
struct temp
{
int i;
char ch;
int j;
};
Is temp
is incomplete here? If yes why it is incomplete(We know the size of temp)? Not getting clear idea of incomplete types
. Any code snippet which explains this will be helpful.