public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
@ 2024-02-15 14:08 Jonathan Yong
  2024-03-02 13:23 ` Jonathan Yong
  2024-03-17 17:38 ` Mike Stump
  0 siblings, 2 replies; 5+ messages in thread
From: Jonathan Yong @ 2024-02-15 14:08 UTC (permalink / raw)
  To: Gcc Patch List

[-- Attachment #1: Type: text/plain, Size: 2833 bytes --]

Attached patch OK?

Copy/pasted for review convenience.

diff --git a/gcc/testsuite/c-c++-common/Wrestrict.c b/gcc/testsuite/c-c++-common/Wrestrict.c
index 4d005a618b3..57a3f67e21e 100644
--- a/gcc/testsuite/c-c++-common/Wrestrict.c
+++ b/gcc/testsuite/c-c++-common/Wrestrict.c
@@ -381,14 +381,14 @@ void test_memcpy_range_exceed (char *d, const char *s)
    T (d + i, s + 1, 3);   /* { dg-warning "accessing 3 bytes at offsets \\\[\[0-9\]+, \[0-9\]+] and 1 overlaps 1 byte" "memcpy" } */
  
  #if __SIZEOF_SIZE_T__ == 8
-  /* Verfiy the offset and size computation is correct.  The overlap
-     offset mentioned in the warning plus sthe size of the access must
+  /* Verify the offset and size computation is correct.  The overlap
+     offset mentioned in the warning plus the size of the access must
       not exceed DIFF_MAX.  */
-  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
-  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
+  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
+  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
  
-  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
-  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
+  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
+  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
  #elif __SIZEOF_SIZE_T__ == 4
    T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[2147483645, 2147483647] overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */
    T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[2147483645, 2147483647] and 0 overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */

[-- Attachment #2: 0001-c-c-common-Wrestrict.c-fix-some-typos-and-enable-for.patch --]
[-- Type: text/x-patch, Size: 3270 bytes --]

From 57b2310756b5d0de99fbdbf7b0b11f01fe66be11 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sun, 11 Feb 2024 09:25:25 +0000
Subject: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64

Signed-off-by: Jonathan Yong <10walls@gmail.com>

gcc/testsuite:

	* c-c++-common/Wrestrict.c: Fix typos in comments and
	enable for LLP64 testing.
---
 gcc/testsuite/c-c++-common/Wrestrict.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/Wrestrict.c b/gcc/testsuite/c-c++-common/Wrestrict.c
index 4d005a618b3..57a3f67e21e 100644
--- a/gcc/testsuite/c-c++-common/Wrestrict.c
+++ b/gcc/testsuite/c-c++-common/Wrestrict.c
@@ -381,14 +381,14 @@ void test_memcpy_range_exceed (char *d, const char *s)
   T (d + i, s + 1, 3);   /* { dg-warning "accessing 3 bytes at offsets \\\[\[0-9\]+, \[0-9\]+] and 1 overlaps 1 byte" "memcpy" } */
 
 #if __SIZEOF_SIZE_T__ == 8
-  /* Verfiy the offset and size computation is correct.  The overlap
-     offset mentioned in the warning plus sthe size of the access must
+  /* Verify the offset and size computation is correct.  The overlap
+     offset mentioned in the warning plus the size of the access must
      not exceed DIFF_MAX.  */
-  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
-  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
+  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
+  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
 
-  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
-  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
+  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
+  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
 #elif __SIZEOF_SIZE_T__ == 4
   T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[2147483645, 2147483647] overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */
   T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[2147483645, 2147483647] and 0 overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */
-- 
2.43.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
  2024-02-15 14:08 [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64 Jonathan Yong
@ 2024-03-02 13:23 ` Jonathan Yong
  2024-03-17  5:41   ` NightStrike
  2024-03-17 17:38 ` Mike Stump
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Yong @ 2024-03-02 13:23 UTC (permalink / raw)
  To: Gcc Patch List

On 2/15/24 14:08, Jonathan Yong wrote:
> Attached patch OK?
> 
> Copy/pasted for review convenience.
Ping.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
  2024-03-02 13:23 ` Jonathan Yong
@ 2024-03-17  5:41   ` NightStrike
  0 siblings, 0 replies; 5+ messages in thread
From: NightStrike @ 2024-03-17  5:41 UTC (permalink / raw)
  To: Jonathan Yong; +Cc: Gcc Patch List

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Sat, Mar 2, 2024, 08:24 Jonathan Yong <10walls@gmail.com> wrote:

> On 2/15/24 14:08, Jonathan Yong wrote:
> > Attached patch OK?
> >
> > Copy/pasted for review convenience.
> Ping.
>

Pinging this for Jon. It's been a couple months, and this should be mostly
obvious if someone has a spare minute.

>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
  2024-02-15 14:08 [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64 Jonathan Yong
  2024-03-02 13:23 ` Jonathan Yong
@ 2024-03-17 17:38 ` Mike Stump
  2024-03-18 23:37   ` Jonathan Yong
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Stump @ 2024-03-17 17:38 UTC (permalink / raw)
  To: Jonathan Yong; +Cc: Gcc Patch List

On Feb 15, 2024, at 6:08 AM, Jonathan Yong <10walls@gmail.com> wrote:
> 
> Attached patch OK?

Ok.

> Copy/pasted for review convenience.
> 
> diff --git a/gcc/testsuite/c-c++-common/Wrestrict.c b/gcc/testsuite/c-c++-common/Wrestrict.c
> index 4d005a618b3..57a3f67e21e 100644
> --- a/gcc/testsuite/c-c++-common/Wrestrict.c
> +++ b/gcc/testsuite/c-c++-common/Wrestrict.c
> @@ -381,14 +381,14 @@ void test_memcpy_range_exceed (char *d, const char *s)
>   T (d + i, s + 1, 3);   /* { dg-warning "accessing 3 bytes at offsets \\\[\[0-9\]+, \[0-9\]+] and 1 overlaps 1 byte" "memcpy" } */
>  #if __SIZEOF_SIZE_T__ == 8
> -  /* Verfiy the offset and size computation is correct.  The overlap
> -     offset mentioned in the warning plus sthe size of the access must
> +  /* Verify the offset and size computation is correct.  The overlap
> +     offset mentioned in the warning plus the size of the access must
>      not exceed DIFF_MAX.  */
> -  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
> -  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
> +  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
> +  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
> -  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
> -  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
> +  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
> +  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
> #elif __SIZEOF_SIZE_T__ == 4
>   T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[2147483645, 2147483647] overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */
>   T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[2147483645, 2147483647] and 0 overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */<0001-c-c-common-Wrestrict.c-fix-some-typos-and-enable-for.patch>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
  2024-03-17 17:38 ` Mike Stump
@ 2024-03-18 23:37   ` Jonathan Yong
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Yong @ 2024-03-18 23:37 UTC (permalink / raw)
  To: Mike Stump; +Cc: Gcc Patch List

On 3/17/24 17:38, Mike Stump wrote:
> On Feb 15, 2024, at 6:08 AM, Jonathan Yong wrote:
>>
>> Attached patch OK?
> 
> Ok.
> 
>> Copy/pasted for review convenience.
>>
>> diff --git a/gcc/testsuite/c-c++-common/Wrestrict.c b/gcc/testsuite/c-c++-common/Wrestrict.c
>> index 4d005a618b3..57a3f67e21e 100644
>> --- a/gcc/testsuite/c-c++-common/Wrestrict.c
>> +++ b/gcc/testsuite/c-c++-common/Wrestrict.c
>> @@ -381,14 +381,14 @@ void test_memcpy_range_exceed (char *d, const char *s)
>>    T (d + i, s + 1, 3);   /* { dg-warning "accessing 3 bytes at offsets \\\[\[0-9\]+, \[0-9\]+] and 1 overlaps 1 byte" "memcpy" } */
>>   #if __SIZEOF_SIZE_T__ == 8
>> -  /* Verfiy the offset and size computation is correct.  The overlap
>> -     offset mentioned in the warning plus sthe size of the access must
>> +  /* Verify the offset and size computation is correct.  The overlap
>> +     offset mentioned in the warning plus the size of the access must
>>       not exceed DIFF_MAX.  */
>> -  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
>> -  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
>> +  T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
>> +  T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
>> -  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
>> -  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target lp64 } } */
>> +  T (d, s + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[9223372036854775805, 9223372036854775807] overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
>> +  T (d + i, s, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[9223372036854775805, 9223372036854775807] and 0 overlaps 3 bytes at offset 9223372036854775802" "LP64" { target { lp64 || llp64 } } } */
>> #elif __SIZEOF_SIZE_T__ == 4
>>    T (d, d + i, 5);   /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[2147483645, 2147483647] overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */
>>    T (d + i, d, 5);   /* { dg-warning "accessing 5 bytes at offsets \\\[2147483645, 2147483647] and 0 overlaps 3 bytes at offset 2147483642" "ILP32" { target ilp32 } } */<0001-c-c-common-Wrestrict.c-fix-some-typos-and-enable-for.patch>
> 

Thanks all, pushed to master branch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-18 23:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 14:08 [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64 Jonathan Yong
2024-03-02 13:23 ` Jonathan Yong
2024-03-17  5:41   ` NightStrike
2024-03-17 17:38 ` Mike Stump
2024-03-18 23:37   ` Jonathan Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).