Is ((void *) -1) a valid address?
Verbatim from Linux' man shmat : RETURN VALUE [...] on error (void *) -1 is returned, and errno is set to indicate the cause of the error. (POSIX tells the same using a slightly different wording .) Is there any mandatory rule or definition (standard?) that (void *) -1 may not be a valid address? To answer the question directly, no, there is no mandatory rule, definition, standard, or specification that says (void *) -1 may not be a valid address. (Of course, no rules, definitions, standards, or specifications about memory addresses are mandatory. I see people walking down the street every day