public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "terra at gnome dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56888] memcpy implementation optimized as a call to memcpy Date: Tue, 19 Dec 2023 02:07:05 +0000 [thread overview] Message-ID: <bug-56888-4-84sZV3l2io@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56888-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 --- Comment #48 from M Welinder <terra at gnome dot org> --- It's your (1). gcc is changing a program that can rely on errno not being changed to one where the C library can change it. (The current C library or any future library that the resulting binary may be dynamically linked against.) Consider code like this fd = open(filename, ...); if (fd < 0) { fprintf(stderr, "%*s: %s\n", MIN(20, mystrlen (filename)), ; filename, strerror(errno)); ...; } If the C library is in a bad mood you will print the wrong error message. strlen isn't the obvious candidate for a C library function changing errno, but I can see an instrumented library do it. Is there any real-world situation that benefits from introducing these calls? It has the feel of optimizing for a benchmark.
next prev parent reply other threads:[~2023-12-19 2:07 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-08 23:40 [Bug middle-end/56888] New: " xanclic at gmail dot com 2013-04-09 9:59 ` [Bug middle-end/56888] " mikpe at it dot uu.se 2013-04-09 10:01 ` rguenth at gcc dot gnu.org 2013-04-09 10:01 ` jakub at gcc dot gnu.org 2013-04-09 13:02 ` xanclic at gmail dot com 2013-04-09 13:17 ` rguenther at suse dot de 2013-04-09 13:20 ` xanclic at gmail dot com 2013-04-11 11:29 ` rguenth at gcc dot gnu.org 2013-06-23 0:01 ` jeff@deseret-tech.com 2013-07-17 7:52 ` paulo@matos-sorge.com 2013-07-17 17:10 ` brooks at gcc dot gnu.org 2013-07-17 17:28 ` xanclic at gmail dot com 2013-07-17 20:36 ` schwab@linux-m68k.org 2013-07-17 20:59 ` xanclic at gmail dot com 2013-07-17 22:31 ` schwab@linux-m68k.org 2013-07-18 0:26 ` xanclic at gmail dot com 2013-07-18 10:35 ` paulo@matos-sorge.com 2013-07-28 3:30 ` bugdal at aerifal dot cx 2013-10-02 7:59 ` bernd.edlinger at hotmail dot de 2013-10-02 8:17 ` rguenth at gcc dot gnu.org 2013-10-02 8:49 ` bernd.edlinger at hotmail dot de 2013-10-02 8:59 ` rguenther at suse dot de 2014-02-17 3:48 ` janosch.rux at web dot de 2014-04-29 13:50 ` rguenth at gcc dot gnu.org 2014-04-29 13:57 ` rguenth at gcc dot gnu.org 2014-04-29 14:47 ` bugdal at aerifal dot cx 2014-05-06 10:51 ` rguenth at gcc dot gnu.org 2014-05-06 10:52 ` rguenth at gcc dot gnu.org 2014-06-06 10:40 ` terra at gnome dot org 2014-06-06 11:54 ` rguenther at suse dot de 2014-11-03 7:09 ` fd935653 at opayq dot com 2020-08-16 22:51 ` pinskia at gcc dot gnu.org 2022-06-03 6:55 ` pinskia at gcc dot gnu.org 2022-10-26 17:06 ` pinskia at gcc dot gnu.org 2023-12-18 20:59 ` terra at gnome dot org 2023-12-18 21:32 ` david at westcontrol dot com 2023-12-19 2:07 ` terra at gnome dot org [this message] 2023-12-19 8:03 ` rguenth at gcc dot gnu.org 2023-12-19 8:06 ` rguenth at gcc dot gnu.org 2023-12-19 8:28 ` david at westcontrol dot com
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=bug-56888-4-84sZV3l2io@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).