public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bonzini at gnu dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/12019] memchr overshoots on Alpha
Date: Wed, 15 Sep 2010 08:06:00 -0000	[thread overview]
Message-ID: <20100915080613.16433.qmail@sourceware.org> (raw)
In-Reply-To: <20100914154213.12019.eblake@redhat.com>


------- Additional Comments From bonzini at gnu dot org  2010-09-15 08:06 -------
Andreas,

7.22.5 of ISO/IEC 9899:201x (the description of memchr) never refers to S as
being an array.

Compare:

7.20.6.5. The snprintf function [...] The snprintf function is equivalent to
fprintf, except that the output is written into an array (specified by argument
s) rather than to a stream.

7.22.5. The memchr function locates the first occurrence of c (converted to an
unsigned char) in the initial n characters (each interpreted as unsigned char)
of the object pointed to by s.


Besides, even if your interpretation was correct, going beyond what the standard
promises would have other advantages.  For example: 1) consistency, as the
manual specifies that "rawmemchr (str, '\0') will never go beyond the end of the
string; 2) ease of implementing rawmemchr specially for the Alpha, based on the
Alpha memchr.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=12019

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2010-09-15  8:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 15:42 [Bug libc/12019] New: " eblake at redhat dot com
2010-09-14 15:43 ` [Bug libc/12019] " eblake at redhat dot com
2010-09-14 16:15 ` drepper at gmail dot com
2010-09-14 18:30 ` eblake at redhat dot com
2010-09-14 18:32 ` vapier at gentoo dot org
2010-09-14 18:32 ` vapier at gentoo dot org
2010-09-14 18:35 ` mattst88 at gmail dot com
2010-09-14 18:37 ` rth at gcc dot gnu dot org
2010-09-14 21:31 ` eblake at redhat dot com
2010-09-15  7:42 ` schwab at linux-m68k dot org
2010-09-15  8:06 ` bonzini at gnu dot org [this message]
2010-09-15  8:23 ` schwab at linux-m68k dot org
2010-09-15  8:27 ` schwab at linux-m68k dot org
2010-09-15 13:42 ` eblake at redhat dot com
2010-09-15 16:04 ` rth at gcc dot gnu dot org
2010-09-15 16:28 ` eblake at redhat dot com
2010-09-15 16:44 ` eblake at redhat dot com
2010-09-15 16:45 ` eblake at redhat dot com
2010-09-15 17:48 ` rth at gcc dot gnu dot org
2010-09-22 22:47 ` eblake at redhat dot com
2010-09-23 10:48 ` mcree at orcon dot net dot nz
2010-09-23 15:09 ` rth at gcc dot gnu dot org
2010-09-26  8:33 ` mcree at orcon dot net dot nz
2010-09-26 18:14 ` rth at gcc dot gnu dot org
     [not found] <bug-12019-131@http.sourceware.org/bugzilla/>
2014-06-30  8:03 ` fweimer at redhat dot com
2023-12-11 17:21 ` gabravier at gmail 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=20100915080613.16433.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /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).