Re: GCC 4.9.4 + GDC-patch: internal compiler error in libphobos/src/std/math.d:8040:47

2019-01-06 Thread Iain Buclaw via Digitalmars-d-learn
On Saturday, 5 January 2019 at 22:27:49 UTC, kdevel wrote: I applied the head commit ce249d880969111384d17f744687e427c843f1d4 Merge: 8a6b7a4 0e517e4 Author: Eugene Wissner Date: Tue Apr 10 15:37:32 2018 +0200 Merge pull request #647 from belka-ew/gdc-49up Merge

Re: Forward declaration inside Function block, no error?

2019-01-06 Thread Neia Neutuladh via Digitalmars-d-learn
On Sun, 06 Jan 2019 20:19:59 +, Rubn wrote: > You can declare functions inside of functions in D. You weren't forward > declare grow() in the module namespace, so much as you were forward > declaring a new function grow. Unfortunately, you can't do forward declarations for nested functions.

Converting an integer to a string with std.format.

2019-01-06 Thread Per Nordlöw via Digitalmars-d-learn
When converting a single integer to a string is `formatValue` preferred over `formattedWrite` in terms of compilation and run-time performance?

Re: Forward declaration inside Function block, no error?

2019-01-06 Thread Rubn via Digitalmars-d-learn
On Sunday, 6 January 2019 at 18:38:44 UTC, Benjamin Thaut wrote: Today I found a bug in my D code. import std.stdio; // Type your code here, or load an example. void grow() { writeln("grow"); } void someFunc(bool condition) { if(condition) { void grow(); } } I tried

Re: Getting error in dmd testsuite

2019-01-06 Thread Thomas Mader via Digitalmars-d-learn
On Thursday, 28 December 2017 at 14:45:54 UTC, Thomas Mader wrote: gcc does not create the symbol at all on NixOS. I already created an issue for NixOS: https://github.com/NixOS/nixpkgs/issues/28896 I am not supposed to ask here but maybe someone knows about problems with gcc? I finally

Re: 9999999999999999.0 - 9999999999999998.0

2019-01-06 Thread Samir via Digitalmars-d-learn
On Sunday, 6 January 2019 at 01:05:08 UTC, Adam D. Ruppe wrote: That's because it is done at compile time, since both are compile-time constants. The compiler will evaluate it using the maximum precision available to the compiler, ignoring your request to cast it to double (which annoys some