On Jan 4, 2021, Mike Stump wrote:
> Oh, It's possible the comments were stripped from the bug report or
> initial email. Never mind then about the comment part.
Thanks, I'm installing the initial patch. Please let me know in case I
mistook the above as approval thereof.
--
Alexandre Oliva,
On Jan 1, 2021, at 6:41 PM, Alexandre Oliva wrote:
>
> On Jan 1, 2021, Mike Stump wrote:
>
>> On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote:
>>>
>>> On Dec 29, 2020, Mike Stump wrote:
>>>
a[i-1] = i;
>>>
>>> 'fraid that won't pass:
>>>
>>> for (int i = 0; i < n; i++) {
>>> asser
On Jan 1, 2021, Mike Stump wrote:
> On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote:
>>
>> On Dec 29, 2020, Mike Stump wrote:
>>
>>> a[i-1] = i;
>>
>> 'fraid that won't pass:
>>
>> for (int i = 0; i < n; i++) {
>> assert (a[i] == i);
>> }
> Ok, how about your version with the comment up
On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote:
>
> On Dec 29, 2020, Mike Stump wrote:
>
>> a[i-1] = i;
>
> 'fraid that won't pass:
>
>for (int i = 0; i < n; i++) {
>assert (a[i] == i);
>}
Ok, how about your version with the comment updated?
On Dec 29, 2020, Mike Stump wrote:
> a[i-1] = i;
'fraid that won't pass:
for (int i = 0; i < n; i++) {
assert (a[i] == i);
}
we could make it:
a[i-1] = i-1;
but... yuck.
IMHO it's a lot less surprising to have an init loop that matches the check.
>> +++ b/gcc/tests
On Dec 22, 2020, at 1:44 PM, Alexandre Oliva wrote:
>
> The constexpr iteration dereferenced an array element past the end of
> the array.
>
> Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
> Ok to install?
How about:
a[i-1] = i;
instead? This I think better matche
The constexpr iteration dereferenced an array element past the end of
the array.
Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
Ok to install?
from Jerome Lambourg
for gcc/testsuite/ChangeLog
* g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue.
---
gcc/tests