Is incrementing a null pointer well-defined?
问题 There are lots of examples of undefined/unspecified behavior when doing pointer arithmetics - pointers have to point inside the same array (or one past the end), or inside the same object, restrictions on when you can do comparisons/operations based on the above, etc. Is the following operation well-defined? int* p = 0; p++; 回答1: §5.2.6/1: The value of the operand object is modified by adding 1 to it, unless the object is of type bool [..] And additive expressions involving pointers are