public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/64720] New: Provide strict check for pure attribute
@ 2015-01-21 22:01 fizzbooze at gmail dot com
2015-01-21 22:56 ` [Bug middle-end/64720] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: fizzbooze at gmail dot com @ 2015-01-21 22:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64720
Bug ID: 64720
Summary: Provide strict check for pure attribute
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: fizzbooze at gmail dot com
Currently an impure function can be attributed as 'pure' and still compile
correctly with no warnings or errors. i.e.:
// BEGIN CODE
int global = 0;
__attribute__((pure))
void foo() {
global += 1; // this obviously violates the pure attribute
}
int main() {
foo();
}
// END CODE
It would be nice to be able to enable some sort of warning or error for code
like this.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/64720] Provide strict check for pure attribute
2015-01-21 22:01 [Bug middle-end/64720] New: Provide strict check for pure attribute fizzbooze at gmail dot com
@ 2015-01-21 22:56 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-21 22:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64720
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Exact dup of bug 18487.
*** This bug has been marked as a duplicate of bug 18487 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-21 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 22:01 [Bug middle-end/64720] New: Provide strict check for pure attribute fizzbooze at gmail dot com
2015-01-21 22:56 ` [Bug middle-end/64720] " pinskia at gcc dot gnu.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).