Re: Issue with struct invariants

2025-03-06 Thread Kirill Kryukov via Digitalmars-d-learn
Thanks for checking. Looks like it works with DMD, LDC, and older GDC, so this could be a GDC regression. I'll try to post it in GDC (GCC) Bugzilla if I can get an account there.

Issue with struct invariants

2025-03-05 Thread Kirill Kryukov via Digitalmars-d-learn
Hi all, I was debugging an old project that started crashing after upgrading to a recent toolchain. I noticed that commenting out invariants helps. I reduced it to the following: ``` import std.conv: to; struct A { ulong n; string str() { if (n == 0) { return "0"; }

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-04 Thread Kirill Kryukov via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 11:17:49 UTC, Jonathan M Davis wrote: version(DIGITAL_MARS_STDIO) extern(C) int setmode(int, int) nothrow @nogc; else version(MICROSOFT_STDIO) { extern(C) int _setmode(int, int) nothrow @nogc; alias setmode = _setmode; } It really should be put in dr

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-03 Thread Kirill Kryukov via Digitalmars-d-learn
On Thursday, 3 November 2016 at 08:04:45 UTC, Jonathan M Davis wrote: [...] Thank you for a detailed clarification about setmode availability. I'll think more about how to proceed with it, and whether I should request it in druntime. I will try to make a bug report about deprecation. Thank

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-02 Thread Kirill Kryukov via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 11:17:49 UTC, Jonathan M Davis wrote: setmode was never publicly documented, and technically, you weren't supposed to be using it from there (since it wasn't documented). It was fixed in 2.072.0 so that all of the undocumented stuff in std.stdio was made private

Error: function std.stdio.setmode is not accessible from module a

2016-11-02 Thread Kirill Kryukov via Digitalmars-d-learn
Hello, dmd 2.072.0 broke my project. I reduced it to following: = a.d start = import std.stdio; void main() { setmode(stdin.fileno, 0x8000); } = a.d end = Compiling on Windows 7 64-bit with the following commands: C:\utl\dev\D\dmd-2.071.2\windows\bin\dmd.exe a.d -ofa1.exe