[Issue 3882] Unused result of pure functions

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3882 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|2.040 |D2 --

[Issue 3882] Unused result of pure functions

2014-03-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #36 from github-bugzi...@puremagic.com 2014-03-22 15:16:12 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 3882] Unused result of pure functions

2014-03-21 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #34 from github-bugzi...@puremagic.com 2014-03-21 10:47:49 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 3882] Unused result of pure functions

2014-03-21 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 bearophile_h...@eml.cc changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|

[Issue 3882] Unused result of pure functions

2014-03-20 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #33 from github-bugzi...@puremagic.com 2014-03-20 12:06:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime

[Issue 3882] Unused result of pure functions

2014-03-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 bearophile_h...@eml.cc changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 3882] Unused result of pure functions

2014-03-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #31 from Per Nordl�w per.nord...@gmail.com 2014-03-19 02:35:38 PDT --- There's a corresponding pull request for dmd that hasn't been merged yet because Phobos still generates warnings (assumeSafeAppend). I don't understand why I

[Issue 3882] Unused result of pure functions

2014-03-18 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #27 from Per Nordl�w per.nord...@gmail.com 2014-03-18 06:40:27 PDT --- It's not a good idea to Inhibit more DMD warnings introducing spurious variables that could generate new variable not used warnings: If you're interested I

[Issue 3882] Unused result of pure functions

2014-03-18 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #28 from bearophile_h...@eml.cc 2014-03-18 06:53:41 PDT --- (In reply to comment #27) If you're interested I could try looking into adding support in DMD for emitting such warnings. This is an entirely new topic, so it must be

[Issue 3882] Unused result of pure functions

2014-03-18 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #29 from github-bugzi...@puremagic.com 2014-03-18 20:03:41 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 3882] Unused result of pure functions

2014-03-18 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 Infiltrator lt.infiltra...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 3882] Unused result of pure functions

2014-03-18 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #30 from bearophile_h...@eml.cc 2014-03-18 20:47:18 PDT --- (In reply to comment #29) Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 3882] Unused result of pure functions

2014-03-13 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #26 from bearophile_h...@eml.cc 2014-03-13 02:58:34 PDT --- (In reply to comment #25) Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 3882] Unused result of pure functions

2014-03-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #25 from github-bugzi...@puremagic.com 2014-03-12 22:14:09 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 3882] Unused result of pure functions

2014-03-09 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #22 from github-bugzi...@puremagic.com 2014-03-09 12:10:49 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 3882] Unused result of pure functions

2014-03-09 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #23 from bearophile_h...@eml.cc 2014-03-09 12:47:48 PDT --- Perhaps I am missing something, but I am not seeing a warning with this code: int foo(int x) pure nothrow { return x - 1; } void main() { foo(5); } --

[Issue 3882] Unused result of pure functions

2014-03-09 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #24 from bearophile_h...@eml.cc 2014-03-09 12:50:34 PDT --- (In reply to comment #23) Perhaps I am missing something, but I am not seeing a warning with this code: int foo(int x) pure nothrow { return x - 1; } void

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #10 from Walter Bright bugzi...@digitalmars.com 2014-03-01 00:34:08 PST --- https://github.com/D-Programming-Language/dmd/pull/3342 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #11 from Per Nordl�w per.nord...@gmail.com 2014-03-01 14:43:50 PST --- (In reply to comment #10) https://github.com/D-Programming-Language/dmd/pull/3342 This pull request adds warnings for unused non-void returns of calls to

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #12 from bearophile_h...@eml.cc 2014-03-01 15:20:21 PST --- (In reply to comment #11) This pull request adds warnings for unused non-void returns of calls to strictly pure function calls. Is adding a cast(void) before the

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 bearophile_h...@eml.cc changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #14 from bearophile_h...@eml.cc 2014-03-01 15:43:03 PST --- (In reply to comment #13) It still think it would be useful to also show the context of the called function. What do you think? What's the context of the called

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #15 from Per Nordl�w per.nord...@gmail.com 2014-03-01 15:47:07 PST --- (In reply to comment #14) (In reply to comment #13) It still think it would be useful to also show the context of the called function. What do you

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #16 from bearophile_h...@eml.cc 2014-03-01 16:16:25 PST --- (In reply to comment #15) Here's my proposal: t.d(30,17): Warning: Call to strictly pure function f() discards return value, prepend a cast(void) if intentional

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #17 from Per Nordl�w per.nord...@gmail.com 2014-03-01 16:25:25 PST --- In general if a programmer is using an IDE it's easy to click on the function name at the call point, and jump to the function definition. So the second

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #18 from bearophile_h...@eml.cc 2014-03-01 16:35:31 PST --- (In reply to comment #17) I don't think there are any IDEs that support semantic resolution of overloaded and/or templated functions especially not when they are

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #19 from Per Nordl�w per.nord...@gmail.com 2014-03-01 16:53:11 PST --- My suggestion is to search for the cannot call impure function string in the compiler source code and copy how it's done there. Do you mean toPrettyChars()?

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #20 from bearophile_h...@eml.cc 2014-03-01 16:59:27 PST --- (In reply to comment #19) What does test.f!int.f mean? ... @safe pure nothrow T f(T)(T x) { return x*x; } void main(string args[]) { int x = 3;

[Issue 3882] Unused result of pure functions

2014-03-01 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #21 from Per Nordl�w per.nord...@gmail.com 2014-03-01 17:01:58 PST --- (In reply to comment #20) (In reply to comment #19) What does test.f!int.f mean? ... @safe pure nothrow T f(T)(T x) { return x*x; } void

[Issue 3882] Unused result of pure functions

2013-03-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 bearophile_h...@eml.cc changed: What|Removed |Added CC||per.nord...@gmail.com ---

[Issue 3882] Unused result of pure functions

2012-01-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 Trass3r mrmoc...@gmx.de changed: What|Removed |Added CC||mrmoc...@gmx.de --- Comment

[Issue 3882] Unused result of pure functions

2012-01-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 Trass3r mrmoc...@gmx.de changed: What|Removed |Added Resolution|WONTFIX |LATER -- Configure

[Issue 3882] Unused result of pure functions

2011-06-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 bearophile_h...@eml.cc changed: What|Removed |Added Resolution|FIXED |WONTFIX --- Comment #7 from

[Issue 3882] Unused result of pure functions

2011-06-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #6 from bearophile_h...@eml.cc 2011-06-25 23:14:11 PDT --- (In reply to comment #5) I added this as a warning because it's fairly onerous now that we have implicit purity deduction. Thank you very much Walter. DMD 2.054 is

[Issue 3882] Unused result of pure functions

2011-06-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 3882] Unused result of pure functions

2011-03-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #2 from bearophile_h...@eml.cc 2011-03-27 07:29:53 PDT --- If the druntime function to allocate a new array is a pure function, then this enhancement request catches a bug like this too: { new int[10]; } -- Configure

[Issue 3882] Unused result of pure functions

2011-03-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #3 from bearophile_h...@eml.cc 2011-03-27 08:39:01 PDT --- KennyTM~ reminds that this is error message is only for strongly pure functions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You

[Issue 3882] Unused result of pure functions

2011-03-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #4 from bearophile_h...@eml.cc 2011-03-27 13:21:22 PDT --- Walter seems to appreciate the idea: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=132932 -- Configure issuemail:

[Issue 3882] Unused result of pure functions

2011-02-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3882 --- Comment #1 from bearophile_h...@eml.cc 2011-02-28 04:21:28 PST --- See also bug 5464 , that contains and expands just the second part of this enhancement request (because putting two different requests in a bugzilla issue is bad). --