A
ais523
Consider the following translation unit:
extern void a;
void* func(void)
{
static void* ap = &a;
return ap;
}
Is this strictly conforming C? (I've written something similar
recently, in a situation with system-specific code where I was using
nonstandard extensions freely, but I was wondering whether it was
legal in c.l.c-standard C.) Arguably, this translation unit itself is
legal (void is just being used the same way any other incomplete type
would be), but there's no way to produce any other combination
translation units in strictly conforming C which would combine with it
to form a strictly conforming program.
extern void a;
void* func(void)
{
static void* ap = &a;
return ap;
}
Is this strictly conforming C? (I've written something similar
recently, in a situation with system-specific code where I was using
nonstandard extensions freely, but I was wondering whether it was
legal in c.l.c-standard C.) Arguably, this translation unit itself is
legal (void is just being used the same way any other incomplete type
would be), but there's no way to produce any other combination
translation units in strictly conforming C which would combine with it
to form a strictly conforming program.