https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Andrew Pinski changed:
What|Removed |Added
CC||xry111 at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|msebor at gcc dot
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 i
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 pure/const,
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 11.2).
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,
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 projec
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 do
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Martin Sebor changed:
What|Removed |Added
Status|RESOLVED|ASSIGNED
Resolution|WONTFIX
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |WONTFIX
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Andrew Pinski changed:
What|Removed |Added
CC||zhongyunde at huawei dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Federico Kircheis changed:
What|Removed |Added
CC||federico.kircheis at gmail dot
com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Martin Sebor changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned at
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) {
> puts("BUM")
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Dávid Bolvanský changed:
What|Removed |Added
CC||david.bolvansky at gmail dot
com
---
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 t
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 di
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. ***
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. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|2004-11-14 21:57:5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #12 from Jakub Jelinek ---
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 function or in some functi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #11
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #10 from David Malcolm ---
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 interprocedurally; I don't think
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
David Malcolm changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #8 from Andrew Pinski ---
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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Andrew Pinski changed:
What|Removed |Added
CC||fizzbooze at gmail dot com
--- Comment #
--- 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
---
--- 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 s
--- 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
---
--- Additional Comments From kazu at cs dot umass dot edu 2004-11-17 00:09
---
This is hard.
--
What|Removed |Added
Status|WAITING |RESOLVED
--- 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
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-14
21:57 ---
Confirmed.
--
What|Removed |Added
Status|UNCONFIRMED |NEW
E
32 matches
Mail list logo