This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C/C++ PATCH to add __typeof_noqual (PR c/65455, c/39985)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>
- Date: Fri, 23 Jun 2017 17:05:00 +0200
- Subject: Re: C/C++ PATCH to add __typeof_noqual (PR c/65455, c/39985)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=polacek at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E00A8C04F4A1
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E00A8C04F4A1
- References: <20170623144606.GB4341@redhat.com> <20170623144833.GF2123@tucnak>
On Fri, Jun 23, 2017 at 04:48:33PM +0200, Jakub Jelinek wrote:
> On Fri, Jun 23, 2017 at 04:46:06PM +0200, Marek Polacek wrote:
> > +++ gcc/c-family/c-common.c
> > @@ -433,6 +433,8 @@ const struct c_common_resword c_common_reswords[] =
> > { "__transaction_cancel", RID_TRANSACTION_CANCEL, 0 },
> > { "__typeof", RID_TYPEOF, 0 },
> > { "__typeof__", RID_TYPEOF, 0 },
> > + { "__typeof_noqual", RID_TYPEOF_NOQUAL, 0 },
> > + { "__typeof_noqual__", RID_TYPEOF_NOQUAL, 0 },
> > { "__underlying_type", RID_UNDERLYING_TYPE, D_CXXONLY },
> > { "__volatile", RID_VOLATILE, 0 },
> > { "__volatile__", RID_VOLATILE, 0 },
> > @@ -506,6 +508,7 @@ const struct c_common_resword c_common_reswords[] =
> > { "typename", RID_TYPENAME, D_CXXONLY | D_CXXWARN },
> > { "typeid", RID_TYPEID, D_CXXONLY | D_CXXWARN },
> > { "typeof", RID_TYPEOF, D_ASM | D_EXT },
> > + { "typeof_noqual", RID_TYPEOF_NOQUAL, D_ASM | D_EXT },
>
> Do you think we need this one? Wouldn't just __typeof_noqual and
> __typeof_noqual__ be sufficient?
Unsure. At first I didn't add typeof_noqual, but then I saw that our doc
use "typeof" and thought it might be better to be consistent and allow
typeof_noqual without leading underscores. But in C++ it's only accepted
with -fgnu-keywords.
I could do without it. Let's see what others think.
Marek