25-10-2013, 04:17 PM
The scope of Rule 11.4 is unclear. The headline text for Rule 11.4 uses the phrase "pointer to object", the amplification just uses "pointer", and the rationale uses both phrases. Is this rule intended to apply to pointers to functions and pointers to incomplete types? In other words, are the following violations of this rule?
If the answer is "yes", then does the exception for null pointer constants (which also uses the phrase "pointer to object") apply to all pointers or just pointers to objects? E.g.:
Code:
void *vp = 1;
int (*fp)(void) = 1;
If the answer is "yes", then does the exception for null pointer constants (which also uses the phrase "pointer to object") apply to all pointers or just pointers to objects? E.g.:
Code:
int *ip = 0; // Okay, allowed by exception
void *vp = 0; // Okay?
int (*fp)(void) = 0; // Okay?
<t></t>