Oct. 29, 2022
11:51 p.m.
On 2022-10-29 11:55, Guy Harris wrote:
Is the first program a sufficiently perverse invoker, in which case I'd expect that argc == 0 will be true of argv[0] == NULL is true, or are you thinking of something even*more* perverse, that gives you a non-zero argc and a null argv[0]?
Yes, I was thinking about the first case, which is allowed by the C standard and by POSIX. The second case does not conform to C or to POSIX. I don't know of any platforms where it happens. As far as I know, tzcode would work even in this case, though it's merely an accident of the code.