public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/35503] New: Warning about restricted pointers?
@ 2008-03-08 1:49 samuel dot thibault at ens-lyon dot org
2008-05-05 5:51 ` [Bug c/35503] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2008-03-08 1:49 UTC (permalink / raw)
To: gcc-bugs
I've again seen some code like this: sprintf(buf, "%s-%s", buf, to_add); and
gcc doesn't complain, even though the declaration of sprintf is extern int
sprintf (char *__restrict __s, __const char *__restrict __format, ...);
Wouldn't it be possible for gcc to check the enforcement of restricted pointer,
at least in the trivial cases like this one?
--
Summary: Warning about restricted pointers?
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: samuel dot thibault at ens-lyon dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35503
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/35503] Warning about restricted pointers?
2008-03-08 1:49 [Bug ada/35503] New: Warning about restricted pointers? samuel dot thibault at ens-lyon dot org
@ 2008-05-05 5:51 ` pinskia at gcc dot gnu dot org
2009-06-25 11:15 ` rguenth at gcc dot gnu dot org
2009-11-27 7:45 ` scovich at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-05 5:51 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35503
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/35503] Warning about restricted pointers?
2008-03-08 1:49 [Bug ada/35503] New: Warning about restricted pointers? samuel dot thibault at ens-lyon dot org
2008-05-05 5:51 ` [Bug c/35503] " pinskia at gcc dot gnu dot org
@ 2009-06-25 11:15 ` rguenth at gcc dot gnu dot org
2009-11-27 7:45 ` scovich at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-25 11:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-06-25 11:15 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-06-25 11:15:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35503
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/35503] Warning about restricted pointers?
2008-03-08 1:49 [Bug ada/35503] New: Warning about restricted pointers? samuel dot thibault at ens-lyon dot org
2008-05-05 5:51 ` [Bug c/35503] " pinskia at gcc dot gnu dot org
2009-06-25 11:15 ` rguenth at gcc dot gnu dot org
@ 2009-11-27 7:45 ` scovich at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: scovich at gmail dot com @ 2009-11-27 7:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from scovich at gmail dot com 2009-11-27 07:45 -------
I've also run into this. Perhaps the machinery which tracks strict aliasing
(and generates best-effort warnings) could be used here?
... adding this comment instead of filing a duplicate :P
--
scovich at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |scovich at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35503
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-27 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-08 1:49 [Bug ada/35503] New: Warning about restricted pointers? samuel dot thibault at ens-lyon dot org
2008-05-05 5:51 ` [Bug c/35503] " pinskia at gcc dot gnu dot org
2009-06-25 11:15 ` rguenth at gcc dot gnu dot org
2009-11-27 7:45 ` scovich at gmail dot com
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).