public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Jakub Jelinek <jakub@redhat.com>,  mark@klomp.org,  dwz@sourceware.org
Subject: Re: [committed] Make main more readable
Date: Thu, 18 Mar 2021 19:52:48 +0100	[thread overview]
Message-ID: <87czvwpa4f.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <dfc806c2-553e-f335-ad56-569cda2d5038@suse.de> (Tom de Vries's message of "Thu, 18 Mar 2021 11:30:00 +0100")

* 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


  reply	other threads:[~2021-03-18 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 13:14 Tom de Vries
2021-03-17 13:18 ` Jakub Jelinek
2021-03-17 13:37   ` Tom de Vries
2021-03-17 17:28     ` Jakub Jelinek
2021-03-18 10:30       ` Tom de Vries
2021-03-18 18:52         ` Florian Weimer [this message]
2021-03-19 16:43           ` [committed] Change files var in main to char ** Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czvwpa4f.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=mark@klomp.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).