public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/98397] New: C2X: pointers to arrays with qualifiers are now pointers to qualified types
@ 2020-12-19 23:03 muecker at gwdg dot de
  2020-12-21 22:23 ` [Bug c/98397] " muecker at gwdg dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: muecker at gwdg dot de @ 2020-12-19 23:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98397
           Summary: C2X: pointers to arrays with qualifiers are now
                    pointers to qualified types
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: muecker at gwdg dot de
  Target Milestone: ---

C2X mostly adopted the rules already implemented in GCC as an extension.

Still, there are two issues:

1. Some pedantic warning should not appear anymore in C2X.

2. The qualifier of a void pointer returned by the tertiary
operator changes in C2X when the one of the pointers points
to an array with qualified type. (This is then also consistent
with C++ and clang)


The following code should compile:


void foo(void)
{
        const int (*u)[1];
        void *v;
        extern const void *vc;
        extern typeof(1 ? u : v) vc;
        extern typeof(1 ? v : u) vc;
}


I have a patch for this in preparation.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-22 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19 23:03 [Bug c/98397] New: C2X: pointers to arrays with qualifiers are now pointers to qualified types muecker at gwdg dot de
2020-12-21 22:23 ` [Bug c/98397] " muecker at gwdg dot de
2021-08-22 22:15 ` cvs-commit at gcc dot gnu.org
2021-08-22 22:18 ` muecker at gwdg dot de

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).