This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4967: GCC should warn about obvious violations of restrict
- From: Andreas Jaeger <aj at suse dot de>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: <gcc-gnats at gcc dot gnu dot org>, <ma at suse dot de>, <gcc-bugs at gcc dot gnu dot org>,schwab at suse dot de
- Date: Thu, 29 Nov 2001 14:56:48 +0100
- Subject: Re: c/4967: GCC should warn about obvious violations of restrict
- References: <Pine.LNX.4.33.0111291301220.29531-100000@kern.srcf.societies.cam.ac.uk>
[Get raw message]
Joseph,
Looking at the final standard and not at a draft, convinced me that
you're right - but I'm not happy with it ;-). The standard implies
that you have to know the implementation of the function to decide
whether a call is defined or not. A call sprintf_restrict (buf, buf)
would only be undefined when the function writes to both pointers but
this cannot be detected at the call side for e.g. library
functions:-(.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj