Re: DMD 2.092 and DIP 25

2020-05-30 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 30 May 2020 at 16:14:34 UTC, Steven Schveighoffer wrote: This is not about const or not, it's about lifetime management. For example, this would return a pointer to a stack frame that is about to go away: const(char)* foo() { ErrorInfo info; return info.message; } I

Re: DMD 2.092 and DIP 25

2020-05-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/30/20 3:00 AM, Mike Parker wrote: The following declarations now give a deprecation warning: ```d struct ErrorInfo { private:     char[32] _error;     char[96] _message; public @nogc nothrow @property:     /**     Returns the string "Missing Symbol" to indicate a symbol load

Re: DMD 2.092 and DIP 25

2020-05-30 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 30 May 2020 at 07:30:17 UTC, Max Samukha wrote: On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote: https://run.dlang.io/is/aOZqww Since 2.067.1: Success and no output Thanks, Max (and you, too, Seb). I had forgotten that run.dlang.io supports compilers going so

Re: DMD 2.092 and DIP 25

2020-05-30 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 30 May 2020 at 07:30:17 UTC, Max Samukha wrote: On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote: https://run.dlang.io/is/aOZqww Since 2.067.1: Success and no output Thanks! I forgot that run.dlang.io supports all those old compilers.

Re: DMD 2.092 and DIP 25

2020-05-30 Thread Seb via Digitalmars-d-learn
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote: The following declarations now give a deprecation warning: ```d struct ErrorInfo { private: char[32] _error; char[96] _message; public @nogc nothrow @property: /** Returns the string "Missing Symbol" to indicate a

Re: DMD 2.092 and DIP 25

2020-05-30 Thread Max Samukha via Digitalmars-d-learn
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote: I find it rather annoying, as I'm returning `const(char)*` and not `char*`, but it is what it is. My question is, if I add `return` to the function declarations, will this compile all the way back to DMD 2.067 *without*

DMD 2.092 and DIP 25

2020-05-30 Thread Mike Parker via Digitalmars-d-learn
The following declarations now give a deprecation warning: ```d struct ErrorInfo { private: char[32] _error; char[96] _message; public @nogc nothrow @property: /** Returns the string "Missing Symbol" to indicate a symbol load failure, and the name of a library to