c/4967: GCC should warn about obvious violations of restrict
Andreas Jaeger
aj@suse.de
Sun Nov 18 20:10:00 GMT 2001
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
More information about the Gcc-bugs
mailing list