From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Joe Buck <jbuck@synopsys.com>
Cc: <gcc@gcc.gnu.org>
Subject: Re: restrict keyword [was: expalin this syntax pls]
Date: Fri, 18 Oct 2002 21:55:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0210190117210.30153-100000@kern.srcf.societies.cam.ac.uk> (raw)
In-Reply-To: <200210190012.g9J0CDh07290@piper.synopsys.com>
On Fri, 18 Oct 2002, Joe Buck wrote:
> This means that we can't issue a hard error for it, but a warning may well
> still be appropriate. Errors are for code that is wrong, warnings are for
> code that is likely to be wrong. If you insist on not issuing warnings for
> such code, we have the problem that we can't use similar mechanisms to
> warn about possible misuse of memcpy, whose specification implies
> "restrict" even for C++, which doesn't have the keyword.
You can't issue a hard error for it anyway, since the code might never be
executed. The key questions for issuing a warning (under its own option,
possibly included in -Wall) are:
* Does anyone write real (broken) code the warning would detect? (The
relevant question for having the warning at all.)
* Does anyone write real (working) code the warning would wrongly trigger
on?
* How common are these?
* Can working code wrongly triggering the warning be easily changed, even
if automatically generated, so as not to trigger it? (The relevant
question for -Wall inclusion.)
In the case of memcpy, we have more information to tell whether a call
*is* a problem (rather than might be).
--
Joseph S. Myers
jsm28@cam.ac.uk
next prev parent reply other threads:[~2002-10-19 0:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-17 23:32 expalin this syntax pls Nathan .
2002-10-18 4:23 ` Jim Wilson
2002-10-18 14:27 ` restrict keyword [was: expalin this syntax pls] Joe Buck
2002-10-18 18:46 ` Joseph S. Myers
2002-10-18 21:53 ` Joe Buck
2002-10-18 21:55 ` Joseph S. Myers [this message]
2002-10-18 23:07 ` kwall
2002-10-19 10:17 Erik Schnetter
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=Pine.LNX.4.33.0210190117210.30153-100000@kern.srcf.societies.cam.ac.uk \
--to=jsm28@cam.ac.uk \
--cc=gcc@gcc.gnu.org \
--cc=jbuck@synopsys.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).