public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Saifi Khan" <saifi.khan@nishan.io>
To: gcc-help@gcc.gnu.org
Subject: Re: build error --std=c++17 vs --std=c++23 -Wrestrict "may overlap up to 9223372036854775813 bytes at offset -3"
Date: Thu, 23 Feb 2023 17:47:51 +0000	[thread overview]
Message-ID: <20230223174752.20084.qmail@s411.sureserver.com> (raw)
In-Reply-To: <CAH6eHdSdaspZcaNG1185NW4q=ASwN_uowsT=9J9r_Aa6On6cXg@mail.gmail.com>

>  -------Original Message-------
>  From: Jonathan Wakely via Gcc-help <gcc-help@gcc.gnu.org>
>  To: Saifi Khan <saifi.khan@nishan.io>
>  Cc: gcc-help@gcc.gnu.org <gcc-help@gcc.gnu.org>
>  Subject: Re: build error --std=c++17 vs --std=c++23 -Wrestrict "may overlap up to 9223372036854775813 bytes at offset -3"
>  Sent: 2023-02-23 16:33
>  
>  On Thu, 23 Feb 2023 at 14:10, Saifi Khan wrote:
>  >
>  > Hi:
>  >
>  > Tried Jonny Grant's example
>  > g++ -O3 --std=c++23 -Wall -c repro_jg01.cc
>  
>  Context please - which example is that? 

#include <string>

typedef struct a_bc
{
    std::string a;
    std::string b;
} a_t;

void f()
{
    a_t c;

    c.a = " sdfsdf fsdfsdf fdfsfdsdf ";   // seems to need this long string to reproduce, down to 8 bytes it didn't
    c.b = "E";
}

Here is a verbatim copy of the the sample code, in which the OP encountered build error(s) with gcc 12.2.x

warm regards
Saifi.

  reply	other threads:[~2023-02-23 17:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 14:09 Saifi Khan
2023-02-23 16:32 ` Jonathan Wakely
2023-02-23 17:47   ` Saifi Khan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-11 23:38 Jonny Grant
2023-02-12  0:14 ` Jonny Grant
2023-02-12  1:33 ` Jonathan Wakely
2023-02-12 11:20   ` Jonny Grant

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=20230223174752.20084.qmail@s411.sureserver.com \
    --to=saifi.khan@nishan.io \
    --cc=gcc-help@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).