[committed] Make main more readable

Florian Weimer fweimer@redhat.com
Thu Mar 18 18:52:48 GMT 2021


* Tom de Vries:

> I've prepared a patch implementing that suggestion.  Does that address
> your concerns?
>
> [ FWIW, I've read through a C99 draft pdf to refresh my memory on this
> topic.  Looking at the effective type of **argv, AFAIU it falls into the
> catagory "For all other accesses to an object having no declared type,
> the effective type of the object is simply the type of the lvalue used
> for the access".  In other words, the effective type is char.
>
> Then I read:
> ...
> An object shall have its stored value accessed only by an lvalue
> expression that has one of the following types:
> — a qualified version of a type compatible with the effective type of
>   the object,
> ...
>
> So, const char is a qualified version of a type char compatible with the
> effective type of the object (char).
>
> So I still don't see the problem. ]

I think the issue is about the char * array elements, not the individual
bytes in the strings themselves.

Thanks,
Florian



More information about the Dwz mailing list