What is this example of modifiable lvalue found in error.h ISO C99?

45 Views Asked by At

I'm reading the ISO C99 Standard and this example of a modifiable lvalue object: *errno() blew me away.

Please could you tell me if this possible implementation of errno is ISO C99 compliant?

int * errno ( void )
{
    static int errval = 0;

    return (&errval);
}

Why might this be preferred over simply creating an externally linked object?

0

There are 0 best solutions below