Re: [PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Aaron Ballman via cfe-commits
Thanks! Commit in r252104. ~Aaron On Wed, Nov 4, 2015 at 7:05 PM, Richard Smith wrote: > LGTM, thanks! > > On Wed, Nov 4, 2015 at 4:00 PM, Aaron Ballman via cfe-commits > wrote: >> >> On Wed, Nov 4, 2015 at 5:46 PM, Richard Smith >> wrote: >> > On Wed, Nov 4, 2015 at 2:45 PM, Richard Smith >>

Re: [PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Richard Smith via cfe-commits
LGTM, thanks! On Wed, Nov 4, 2015 at 4:00 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Nov 4, 2015 at 5:46 PM, Richard Smith > wrote: > > On Wed, Nov 4, 2015 at 2:45 PM, Richard Smith > wrote: > >> > >> It'd be simpler and would more directly match the C spec

Re: [PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Aaron Ballman via cfe-commits
On Wed, Nov 4, 2015 at 5:46 PM, Richard Smith wrote: > On Wed, Nov 4, 2015 at 2:45 PM, Richard Smith wrote: >> >> It'd be simpler and would more directly match the C specification (and >> would handle a few other cases better, such as placeholder types and atomic >> types) if you instead passed t

Re: [PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Richard Smith via cfe-commits
On Wed, Nov 4, 2015 at 2:45 PM, Richard Smith wrote: > It'd be simpler and would more directly match the C specification (and > would handle a few other cases better, such as placeholder types and atomic > types) if you instead passed the operand through DefaultLvalueConversion > or rather, Defa

Re: [PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Richard Smith via cfe-commits
It'd be simpler and would more directly match the C specification (and would handle a few other cases better, such as placeholder types and atomic types) if you instead passed the operand through DefaultLvalueConversion rather than matching against the decayed form of the type. On Wed, Nov 4, 2015

[PATCH] Allow pointer decay and qual stripping for _Generic

2015-11-04 Thread Aaron Ballman via cfe-commits
The control expression for a _Generic selection expression should have its type decayed and qualifiers stripped when determining which selection it matches. e.g., the following should compile: _Generic("test", char *: 1); const int i = 12; _Generic(i, int: 1); This patch fixes PR16340. ~Aa