This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Variants of __typeof
- From: Pedro Alves <pedro at palves dot net>
- To: Richard Henderson <rth at redhat dot com>, Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 04 Feb 2016 17:08:13 +0000
- Subject: Re: [RFC] Variants of __typeof
- Authentication-results: sourceware.org; auth=none
- References: <56B2E940 dot 5060108 at redhat dot com> <56B32D6C dot 3010703 at palves dot net> <20160204110222 dot GC31562 at redhat dot com> <56B378CC dot 40206 at redhat dot com>
On 02/04/2016 04:14 PM, Richard Henderson wrote:
> On 02/04/2016 10:02 PM, Marek Polacek wrote:
>>> Do we need matching __auto_type variants?
>>
>> I think at present __auto_type removes the qualifiers from atomic types only,
>> but I'd hope we can just adjust __auto_type to always strip the qualifiers,
>> not introduce __auto_type_noqual...
>
> Exactly what I was thinking.
Sounds right to me. I think it should be a design goal
for __auto_type and __typeof to be consistent.
GDB's "compile print EXPR" command (what calls gcc through the
libcc1 plugin), passes something like this to gcc:
__auto_type __gdb_val = EXPR;
I believe we may benefit from a __auto_qual_type variant that
strips nothing, but I'm not sure.