public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [patch, wwwdocs] Mention random number generators in porting_to.html
Date: Sat, 18 Mar 2023 22:11:30 +0100	[thread overview]
Message-ID: <f158d482-c2a1-eec1-8265-872feed3829c@gmx.de> (raw)
In-Reply-To: <a0c911ee-4587-10d6-3c75-74538e7623be@netcologne.de>

Hi Thomas,

Am 18.03.23 um 19:23 schrieb Thomas Koenig via Gcc-patches:
> Hi,
> 
> Text says it all.  OK for web pages?
> 
> Best regards
> 
>      Thomas
> 
> Mention issues with integer owerflow for random number generators.
> 
> This mentions the issues with integer overflow and how to work
> around them.

it's basically fine, although I'd prefer a formulation replacing

+ <p> GCC 13 includes new optimizations which expose reliance on
+  non-standard behavior for integer overflow, which was often used
+  for linear congruential pseudo-random number generators in old
+  programs.  It is recommended to use the intrinsic

by something like:

GCC 13 includes new optimizations which may change behavior on
integer overflow.  Traditional code, like linear congruential
pseudo-random number generators in old programs and relying on a
specific, non-standard behavior may now generate unexpected results.
In such cases it is recommended to use the intrinsic ...


Thanks for updating the documentation!

Harald



WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: Thomas Koenig <tkoenig@netcologne.de>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: [patch, wwwdocs] Mention random number generators in porting_to.html
Date: Sat, 18 Mar 2023 22:11:30 +0100	[thread overview]
Message-ID: <f158d482-c2a1-eec1-8265-872feed3829c@gmx.de> (raw)
Message-ID: <20230318211130.mwjQUBKVv1-MCQhtWKMEBL4KMGk0d5HfIWMj1Z6l9g8@z> (raw)
In-Reply-To: <a0c911ee-4587-10d6-3c75-74538e7623be@netcologne.de>

Hi Thomas,

Am 18.03.23 um 19:23 schrieb Thomas Koenig via Gcc-patches:
> Hi,
>
> Text says it all.  OK for web pages?
>
> Best regards
>
>      Thomas
>
> Mention issues with integer owerflow for random number generators.
>
> This mentions the issues with integer overflow and how to work
> around them.

it's basically fine, although I'd prefer a formulation replacing

+ <p> GCC 13 includes new optimizations which expose reliance on
+  non-standard behavior for integer overflow, which was often used
+  for linear congruential pseudo-random number generators in old
+  programs.  It is recommended to use the intrinsic

by something like:

GCC 13 includes new optimizations which may change behavior on
integer overflow.  Traditional code, like linear congruential
pseudo-random number generators in old programs and relying on a
specific, non-standard behavior may now generate unexpected results.
In such cases it is recommended to use the intrinsic ...


Thanks for updating the documentation!

Harald


  reply	other threads:[~2023-03-18 21:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18 18:23 Thomas Koenig
2023-03-18 21:11 ` Harald Anlauf [this message]
2023-03-18 21:11   ` Harald Anlauf

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=f158d482-c2a1-eec1-8265-872feed3829c@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --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).