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? 回答1: 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,