public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/112841] typeof_unqual is not removing qualifiers from the element type of array types
Date: Mon, 04 Dec 2023 06:43:58 +0000	[thread overview]
Message-ID: <bug-112841-4-L2sKi8tN7F@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112841-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112841

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|typeof_unqual is not        |typeof_unqual is not
                   |removing qualifiers from    |removing qualifiers from
                   |array types                 |the element type of array
                   |                            |types
   Last reconfirmed|                            |2023-12-04

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, 6.7.3/10
"If the specification of an array type includes any type qualifiers, both the
array and the element type are so-qualified." and the note 166 notes that this
can happen with typedefs ...

But then typeof_unqual only mentions the about the type qualifer of the array
and not the element type but the example is showing it means the element type
of the array should be unqualified too ...

I am suspecting if we are pedantic about the language used, this would be a
defect in the standard where the typeof_unqual does not mention the `element
type` when it should as the example intends it as such.


Note GCC does not try to remove qualifiers from the element type because of
this quirk in the language of the standard dealing with array types ...

Confirmed at least GCC is not following the example in the standard ...

  reply	other threads:[~2023-12-04  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04  5:16 [Bug c/112841] New: typeof_unqual is not removing qualifiers from " luigighiron at gmail dot com
2023-12-04  6:43 ` pinskia at gcc dot gnu.org [this message]
2023-12-04  6:51 ` [Bug c/112841] typeof_unqual is not removing qualifiers from the element type of " pinskia at gcc dot gnu.org

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=bug-112841-4-L2sKi8tN7F@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).