public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: Jonathan Yong <10walls@gmail.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64
Date: Sun, 17 Mar 2024 10:38:25 -0700	[thread overview]
Message-ID: <D2DD6A43-7C5D-4134-ADD2-25B58B749D9B@comcast.net> (raw)
In-Reply-To: <a045b832-2fa1-4557-8b1e-4f6a234df66a@gmail.com>

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>


  parent reply	other threads:[~2024-03-17 17:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 14:08 Jonathan Yong
2024-03-02 13:23 ` Jonathan Yong
2024-03-17  5:41   ` NightStrike
2024-03-17 17:38 ` Mike Stump [this message]
2024-03-18 23:37   ` Jonathan Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2DD6A43-7C5D-4134-ADD2-25B58B749D9B@comcast.net \
    --to=mikestump@comcast.net \
    --cc=10walls@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).