public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> To: bkoz@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/2767 Date: Tue, 08 May 2001 17:16:00 -0000 [thread overview] Message-ID: <20010509001601.25214.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR libstdc++/2767; it has been noted by GNATS. From: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> To: bkoz@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, stephen@bregmasoft.com Subject: Re: libstdc++/2767 Date: Wed, 9 May 2001 03:09:22 +0200 (CEST) |Regardless, the current implementation is incorrect, as this declaration doesn't exist: | extern "C" const char* strchr(const char*, int); | should be | extern "C" char* strchr(const char*, int); I am puzzled. Stroustrup says in his book "The C++ programming language" (special edition) on page 599: "Functions for manipulating C-style strings are found in <string.h> and <cstring>: ... const char* strchr(const char*, int); char* strchr(char*, int);" On the following page he mentions the "C standard library definition, not C++" of strchr: char* strchr(cont char*, int); This is the same as stated in the book "C, a refrence manual by Harbison and Steele. Therefore, I believe, the prototypes in the current libstdc++ implementation for strchr are indeed correct. One has to cope with the different signatures for the C and the C++ versions of the function strchr (among others). Hope this is correct, Peter Schmid
next reply other threads:[~2001-05-08 17:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-05-08 17:16 Peter Schmid [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-05-29 10:06 libstdc++/2767 Benjamin Kosnik 2001-05-25 19:56 libstdc++/2767 Peter Schmid 2001-05-24 21:56 libstdc++/2767 bkoz 2001-05-08 19:36 libstdc++/2767 Benjamin Kosnik 2001-05-08 15:46 libstdc++/2767 bkoz
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=20010509001601.25214.qmail@sourceware.cygnus.com \ --to=schmid@snake.iap.physik.tu-darmstadt.de \ --cc=bkoz@gcc.gnu.org \ --cc=gcc-prs@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).