public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33048] New: Warn on incorrect __attribute__((pure)), __attribute__((const))
@ 2007-08-11 17:50 ed at catmur dot co dot uk
2007-08-11 17:55 ` [Bug c/33048] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ed at catmur dot co dot uk @ 2007-08-11 17:50 UTC (permalink / raw)
To: gcc-bugs
gcc should warn when a function that is declared with __attribute__((pure)) or
__attribute__((const)) is defined in a way that appears to break those
guarantees.
i.e. an __attribute__((const)) function should not be allowed to dereference
pointers or call non-__attribute__((const)) functions (except perhaps
__attribute__((pure)) functions with pointer arguments only allowed to be
references to local variables?); __attribute__((pure)) similarly.
--
Summary: Warn on incorrect __attribute__((pure)),
__attribute__((const))
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ed at catmur dot co dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33048
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/33048] Warn on incorrect __attribute__((pure)), __attribute__((const))
2007-08-11 17:50 [Bug c/33048] New: Warn on incorrect __attribute__((pure)), __attribute__((const)) ed at catmur dot co dot uk
@ 2007-08-11 17:55 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-11 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-11 17:54 -------
*** This bug has been marked as a duplicate of 18487 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33048
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-11 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-11 17:50 [Bug c/33048] New: Warn on incorrect __attribute__((pure)), __attribute__((const)) ed at catmur dot co dot uk
2007-08-11 17:55 ` [Bug c/33048] " pinskia at gcc dot gnu dot org
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).