[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2023-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Andrew Pinski changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #30 from Federico Kircheis --- It seems to me we are not going to agree as we tend to repeat ourselves, lets see if we go around and around in circles or if it is more like a spiral ;) Your view is more about the compiler, how it

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread dberlin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #29 from Daniel Berlin --- Let me try to explain a different way: The only functions GCC can warn about are those that don’t need the attributes in the first place. The way any warning would work is to detect whether it is

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #28 from Federico Kircheis --- >Edit: sorry, my last comment about what GCC thinks is wrong. Unless it is going to inline the function call, in that case the attributes are as-if ignored (at least the case I've tested with GCC

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #27 from Federico Kircheis --- Edit: sorry, my last comment about what GCC thinks is wrong. GCC seems to follow the gnu::pure/gnu::const directive to the letter, it does not ignore it when it sees the implementation of the function,

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #26 from Federico Kircheis --- As multiple people commented this Ticket, I do not know to who the least message is sent, but I would like to give again my opinion on it, as I would really like to use those attributes in non-toy

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-09-04 Thread dberlin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #25 from Daniel Berlin --- This seems like a bad idea, and is impossible in general. The whole point of the attributes is to tell the compiler things are pure/const in cases it can't already prove. It can already prove a lot, and

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-06-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Martin Sebor changed: What|Removed |Added Status|RESOLVED|ASSIGNED Resolution|WONTFIX

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-06-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Andrew Pinski changed: What|Removed |Added Resolution|--- |WONTFIX Status|ASSIGNED

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-06-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Andrew Pinski changed: What|Removed |Added CC||zhongyunde at huawei dot com ---

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2021-01-15 Thread federico.kircheis at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Federico Kircheis changed: What|Removed |Added CC||federico.kircheis at gmail dot com

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2020-05-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2019-08-17 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #19 from Eric Gallager --- (In reply to Dávid Bolvanský from comment #18) > a.c > > int foo(void) __attribute__((const)); > > > int main(void) { > return foo(); > } > > b.c > > #include > > int foo(void) { >

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2019-08-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com ---

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2019-07-24 Thread dberlin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #17 from Daniel Berlin --- Not sure how i ended up on the CC list for this one, but i actually would disagree it would be better than nothing. Features that can only be made to work a small amount and are incapable of being improved

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2019-07-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #16 from Eric Gallager --- (In reply to Jakub Jelinek from comment #12) > And then there is the case of endless loops in such functions (either > unconditional, or ones the compiler is not able to detect), exit calls, both > either

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2017-07-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #15 from Martin Sebor --- *** Bug 81518 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2017-07-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #14 from Andrew Pinski --- *** Bug 81518 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2016-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|2004-11-14

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #8 from Andrew Pinski pinskia at gcc dot gnu.org --- I don't think I agree with closing this as won't fix as shown now we have three duplicated bugs asking the same thing.

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #10 from David Malcolm dmalcolm at gcc dot gnu.org --- fizzbooze: you were asking on IRC about where the existing implementation is; see gcc/ipa-pure-const.c - though I believe that merely covers tracking the user-provided flags

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added CC||fizzbooze at

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 David Malcolm dmalcolm at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2015-01-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 --- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org --- And then there is the case of endless loops in such functions (either unconditional, or ones the compiler is not able to detect), exit calls, both either directly in the const/pure

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2008-08-08 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2008-08-08 21:01 --- *** Bug 37064 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2007-08-12 Thread gnu at behdad dot org
--- Comment #5 from gnu at behdad dot org 2007-08-13 05:40 --- (In reply to comment #2) If the compiler could tell whether you were right or not in all cases, you wouldn't need the attributes in the first place. This is not completely true though: the compiler cannot tell by just

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2007-08-11 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-08-11 17:54 --- *** Bug 33048 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2004-11-16 Thread dberlin at gcc dot gnu dot org
--- Additional Comments From dberlin at gcc dot gnu dot org 2004-11-16 22:43 --- Actually, I think this is a remarkably bad idea, and would like to close this as wontfix. Pure and const are things that are not easily verifiable by the compiler in a lot of common cases (it may get false

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2004-11-16 Thread kazu at cs dot umass dot edu
--- Additional Comments From kazu at cs dot umass dot edu 2004-11-17 00:09 --- This is hard. -- What|Removed |Added Status|WAITING

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2004-11-14 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-14 21:57 --- Confirmed. -- What|Removed |Added Status|UNCONFIRMED |NEW