Re: [C PATCH RFC] Drop qualifiers during lvalue conversion

2020-11-16 Thread Joseph Myers
On Sun, 15 Nov 2020, Uecker, Martin wrote: > > I think it might be safest to avoid doing any conversion in the case where  > > the value is still of array type at this point (C90 non-lvalue arrays). > > I added a test for arrays, but I am not sure what effect it has. > What would be C90 non-lvalu

Re: [C PATCH RFC] Drop qualifiers during lvalue conversion

2020-11-15 Thread Uecker, Martin
Am Montag, den 09.11.2020, 23:41 + schrieb Joseph Myers: > On Sat, 7 Nov 2020, Uecker, Martin wrote: > >   t = (const T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; > >   test (&t); > > } > > > > Not sure what to do about it, maybe 'convert' is not > > the right function to use. > > I think 'co

Re: [C PATCH RFC] Drop qualifiers during lvalue conversion

2020-11-09 Thread Joseph Myers
On Sat, 7 Nov 2020, Uecker, Martin wrote: > In 'gcc.dg/cond-constqual-1.c' we test for the opposite > behavior for conditional operators. I do not know why. > We could just invert the test. That's probably a relic of the old idea that rvalues might actually have qualified type in some cases; it

[C PATCH RFC] Drop qualifiers during lvalue conversion

2020-11-07 Thread Uecker, Martin
To better understand what impact this may have, I added code to drop the qualifiers in 'convert_lvalue_to_rvalue'. Here is the patch. There are three new errors in the testsuite: In 'gcc.dg/cond-constqual-1.c' we test for the opposite behavior for conditional operators. I do not know why. We cou