You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that if there are no ignored parameters in the format string ("%s %s %s") or if the ignored parameter is the last one in the sequence ("%s %s %*s") then formattedRead() works correctly and does not throw any exceptions. The problem can be reproduced at least on DMD32 v2.109.1 for Linux, DMD32 v2.099.1 for Linux and DMD64 v2.102.2 for Windows.
The equivalent C code compiled by GCC 8.3.0 of course works as expected:
Recently found a strange problem with formatted string parsing in Phobos.
dmd -run ...
for the program:outputs this:
I have checked that if there are no ignored parameters in the format string ("%s %s %s") or if the ignored parameter is the last one in the sequence ("%s %s %*s") then formattedRead() works correctly and does not throw any exceptions. The problem can be reproduced at least on DMD32 v2.109.1 for Linux, DMD32 v2.099.1 for Linux and DMD64 v2.102.2 for Windows.
The equivalent C code compiled by GCC 8.3.0 of course works as expected:
It is not a huge problem since there is an obvious workaround of providing a dummy string but I still hope it will get fixed someday.
The text was updated successfully, but these errors were encountered: