Of course argv is mutable since it's a local variable/param. But what if the pointers are placed, by the OS, into read-only VM pages? Begrudgingly, the string data is made writable though, to conform to the standard.
I don't know of any platform where there are any ill effects. But the number of platforms out there with C implementations is much larger than my direct experience. Maybe this is just some historic baggage that is overdue for a revision. It was discussed in 1998, but no changes were accepted at the time.
In most coding situations, I probably wouldn't care, the same way I don't care about, say, platforms where for some reason you cannot compare pointers to distinct objects using inequality (another thing not required by ISO C). It's better to break the rules knowingly, though. You want to be badass, not dumbass.
Edit: I just saw this SO comment [0]:
> The standard calls argv consistently an array. Modifying an array refers to modifying its members. Thus, it seems obvious that the wording in the standard refers to modifying the members in the argv array, when it states that argv is modifiable.
It is still a mater of interpretation so you shouldn't depend on it.
[0] https://stackoverflow.com/questions/35105918/are-the-pointer...
The modifiability of argv was the subject of at three items in 1998 in meeting n849.
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n849.htm
Someone proposed that clarifying text be added saying "Whether or not the pointers of the argv array shall be modifiable by the program is implementation-defined. If they are modifiable, they shall retain their last-stored values between program startup and program termination." This was rejected due to insufficient interest.
It was proposed that, since of course parameters are modifiable, the sentence in question be shortened to "The strings pointed to by the argv array shall be modifiable by the program, and retain their last-stored values between program startup and program termination", omitting the mention of "parameters argc and argv". This was discussed, but not accepted.
The question was raised whether the pointers are modifiable. Response was: "This is currently implictly unspecified and the committee has chosen to leave it that way."
ISO C says that:
"The parameters argc and argv and the strings pointed to by the argv array shall be modifiable by the program, and retain their last-stored values between program startup and program termination."
Thus within the boundaries of defined ISO C, you can do this:
and you can do this: but not this: I seem to recall finding a problem like this in the K&R2 book also, probably close to thirty years ago. I don't have the book now, but the page number 117 seems to be coming up in my dim memory.