Re: RFA: implement C11 _Generic

2013-08-09 Thread Marek Polacek
On Tue, Jul 23, 2013 at 01:55:19AM +, Joseph S. Myers wrote: > I have now revised this patch from a year ago in line with my > understanding of how _Generic ought to handle the various special > cases (selector undergoes lvalue-to-rvalue conversion, and decay of > functions and arrays to pointe

Re: RFA: implement C11 _Generic

2013-07-23 Thread Joseph S. Myers
On Tue, 23 Jul 2013, Tom Tromey wrote: > Joseph> + /* The association's type, or NULL_TREE for 'default'.. */ > > It's trivial, but I happened to notice that this ".." should be just > ".". The extra "." was in the original patch too. Thanks, I've applied this patch to fix this typo. Index:

Re: RFA: implement C11 _Generic

2013-07-23 Thread Tom Tromey
> "Joseph" == Joseph S Myers writes: Joseph> I have now revised this patch from a year ago in line with my Joseph> understanding of how _Generic ought to handle the various special Joseph> cases Thanks for doing this. Joseph> + /* The association's type, or NULL_TREE for 'default'.. */ I

Re: RFA: implement C11 _Generic

2013-07-22 Thread Joseph S. Myers
On Tue, 23 Jul 2013, Joseph S. Myers wrote: > The committee discussion includes a further point to ensure rvalues > can have qualified type: treating qualified function return types the (to ensure they *can't* have qualified type, that is) -- Joseph S. Myers jos...@codesourcery.com

Re: RFA: implement C11 _Generic

2013-07-22 Thread Joseph S. Myers
I have now revised this patch from a year ago in line with my understanding of how _Generic ought to handle the various special cases (selector undergoes lvalue-to-rvalue conversion, and decay of functions and arrays to pointers, because nothing says it doesn't - "The controlling expression of a ge

Re: RFA: implement C11 _Generic

2012-07-30 Thread Joseph S. Myers
On Mon, 30 Jul 2012, Tom Tromey wrote: > > "Joseph" == Joseph S Myers writes: > > Joseph> On Mon, 30 Jul 2012, Tom Tromey wrote: > >> 6.3 is about conversions, and the first paragraph starts "several > >> operators convert ...". Based on this, and other such phrases in the > >> text, I thin

Re: RFA: implement C11 _Generic

2012-07-30 Thread Tom Tromey
> "Joseph" == Joseph S Myers writes: Joseph> On Mon, 30 Jul 2012, Tom Tromey wrote: >> 6.3 is about conversions, and the first paragraph starts "several >> operators convert ...". Based on this, and other such phrases in the >> text, I think the entire section applies to operators. Joseph>

Re: RFA: implement C11 _Generic

2012-07-30 Thread Joseph S. Myers
On Mon, 30 Jul 2012, Tom Tromey wrote: > 6.3 is about conversions, and the first paragraph starts "several > operators convert ...". Based on this, and other such phrases in the > text, I think the entire section applies to operators. 6.3.2.1 paragraphs 2 and 3 are phrased in terms of operators

Re: RFA: implement C11 _Generic

2012-07-30 Thread Tom Tromey
> "Joseph" == Joseph S Myers writes: Tom> I wasn't really aware of 6.3.2.1, but after reading it and re-reading Tom> 6.5.1.1, I think I agree with his "model 0" interpretation: no promotion Tom> or conversion. Tom> I don't have a standards-based reason for this, though; just my belief Tom> t

Re: RFA: implement C11 _Generic

2012-07-27 Thread Joseph S. Myers
On Fri, 27 Jul 2012, Tom Tromey wrote: > I found this: > > https://groups.google.com/forum/?fromgroups#!topic/comp.std.c/InNlRotSWTc > > I wasn't really aware of 6.3.2.1, but after reading it and re-reading > 6.5.1.1, I think I agree with his "model 0" interpretation: no promotion > or conve

Re: RFA: implement C11 _Generic

2012-07-27 Thread Tom Tromey
> "Joseph" == Joseph S Myers writes: Joseph> Could you explain the choices you have made for the issues Joseph> raised on comp.std.c last month (regarding the handling of Joseph> qualifiers on controlling expressions) and the rationale for Joseph> those choices (and make sure there are approp

Re: RFA: implement C11 _Generic

2012-07-27 Thread Joseph S. Myers
Could you explain the choices you have made for the issues raised on comp.std.c last month (regarding the handling of qualifiers on controlling expressions) and the rationale for those choices (and make sure there are appropriate testcases)? -- Joseph S. Myers jos...@codesourcery.com

RFA: implement C11 _Generic

2012-07-27 Thread Tom Tromey
This patch attempts to implement the C11 _Generic feature. Based on the last comment in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46073 I am not at all sure I've done it correctly. There are a couple of other things that aren't clear to me. First, should c_parser_generic_selection call ma