[Issue 3354] invalid number of args accepted for 1/2 arg floating point instructions
http://d.puremagic.com/issues/show_bug.cgi?id=3354 --- Comment #5 from github-bugzi...@puremagic.com 2012-02-22 22:32:05 PST --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/47487e17d1c0a386f056081ceb26e69033e7906f fix Issue 3354 - invalid number of args accepted for 1/2 arg floating point instructions -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3354] invalid number of args accepted for 1/2 arg floating point instructions
http://d.puremagic.com/issues/show_bug.cgi?id=3354 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1149] Optimizer: obsolete array length loads, common subexpr. elimin. not working
http://d.puremagic.com/issues/show_bug.cgi?id=1149 --- Comment #7 from github-bugzi...@puremagic.com 2012-02-23 00:05:21 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1d1bc367c131144e764d9fb81c36651407e3337d Merge pull request #759 from yebblies/issue1149 Fix OPmsw codegen -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6096] optimizer assert on cdouble to bool conversion
http://d.puremagic.com/issues/show_bug.cgi?id=6096 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||FIXED --- Comment #4 from yebblies yebbl...@gmail.com 2012-02-23 19:48:19 EST --- The patch was merged 3 months ago. https://github.com/D-Programming-Language/dmd/commit/58507a208e12d0b7e44111f5eabd6747e5d79925 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6676] Optimize error std.conv.to!int(const(char[]))
http://d.puremagic.com/issues/show_bug.cgi?id=6676 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #1 from yebblies yebbl...@gmail.com 2012-02-23 19:55:15 EST --- I can't reproduce this with 2.058. Anyone? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7528] The core.atomic module does not have implementations when compiling with -D.
http://d.puremagic.com/issues/show_bug.cgi?id=7528 Kapps opantm+s...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kapps opantm+s...@gmail.com 2012-02-23 01:07:08 PST --- Looks like this is a duplicate of 5930, which didn't appear in my search for atomic. Worth keeping in mind that this does cause incorrect results to be generated without warning when using atomic operations. *** This issue has been marked as a duplicate of issue 5930 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5930] cas doesn't work when used in code compiled with -D
http://d.puremagic.com/issues/show_bug.cgi?id=5930 Kapps opantm+s...@gmail.com changed: What|Removed |Added CC||opantm+s...@gmail.com --- Comment #4 from Kapps opantm+s...@gmail.com 2012-02-23 01:07:09 PST --- *** Issue 7528 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5930] cas doesn't work when used in code compiled with -D
http://d.puremagic.com/issues/show_bug.cgi?id=5930 Kapps opantm+s...@gmail.com changed: What|Removed |Added OS/Version|Linux |All --- Comment #5 from Kapps opantm+s...@gmail.com 2012-02-23 01:10:34 PST --- (In reply to comment #4) *** Issue 7528 has been marked as a duplicate of this issue. *** As mentioned in 7528, this also has the unpleasant side-effect that attempting to use atomic operations (through core.atomic.atomicOp) silently results in incorrect behaviour, as the operations do nothing and return init. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7492] [CTFE] Error at assign to immutable character array
http://d.puremagic.com/issues/show_bug.cgi?id=7492 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2012-02-23 02:06:22 PST --- I'm not sure about this. The int[] case may be an accepts-invalid bug. If you move the declaration of 's' into the inside of a function, you get the same error message, even though CTFE is not involved. And when you do that, if it's an int[] instead of char[], you get the same error. In any case the error is not generated by CTFE. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6815] Char array is turned into string expression during constant folding
http://d.puremagic.com/issues/show_bug.cgi?id=6815 --- Comment #2 from Don clugd...@yahoo.com.au 2012-02-23 02:08:29 PST --- (In reply to comment #1) Probably the same issue: Nope, completely different. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2486] taking address of slice rvalue is valid
http://d.puremagic.com/issues/show_bug.cgi?id=2486 --- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-02-23 02:38:57 PST --- I found related bug that returning slice by auto ref causes an error. struct S { int[] a; auto ref opSlice(){ return a[]; } // line 4 } void main() { S s; s[]; } Output: test.d(4): Error: slice expression this.a[] is not a modifiable lvalue -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7568] New: pragma(msg) segfaults with an aggregate including a class.
http://d.puremagic.com/issues/show_bug.cgi?id=7568 Summary: pragma(msg) segfaults with an aggregate including a class. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE, ice Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2012-02-23 11:02:13 PST --- Test cases: --- class C7568 {} struct S7568 { C7568 c; } auto test7568a() { return [new C7568]; } auto test7568b() { return S7568(new C7568); } pragma(msg, test7568a()); pragma(msg, test7568b()); --- This will cause a segmentation fault: test.d(4): Error: C7568 class literals cannot be returned from CTFE Segmentation fault This happens because an Expression* is assigned to the value 0x1, and the function 'argsToCBuffer' is trying to access the expression without first checking if the expression is a valid pointer. The program should simply fail to compile, without the segfault. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1149] Optimizer: obsolete array length loads, common subexpr. elimin. not working
http://d.puremagic.com/issues/show_bug.cgi?id=1149 --- Comment #8 from bearophile_h...@eml.cc 2012-02-23 04:31:27 PST --- Better: __Dmain comdat L0: sub ESP,0Ch mov ECX,offset FLAT:_D11TypeInfo_Ak6__initZ pushEBX pushESI lea EAX,8[ESP] mov dword ptr 8[ESP],0 mov dword ptr 0Ch[ESP],0 pushEAX push4 pushECX callnear ptr __d_arraysetlengthT mov EBX,018h[ESP] mov EDX,1 mov [EBX],EDX mov ESI,018h[ESP] mov 4[ESI],EDX mov EAX,018h[ESP] mov 8[EAX],EDX mov ECX,018h[ESP] xor EAX,EAX mov 0Ch[ECX],EDX add ESP,0Ch pop ESI pop EBX add ESP,0Ch ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6676] Optimize error std.conv.to!int(const(char[]))
http://d.puremagic.com/issues/show_bug.cgi?id=6676 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED CC||bearophile_h...@eml.cc Resolution||WORKSFORME --- Comment #2 from bearophile_h...@eml.cc 2012-02-23 04:42:45 PST --- It seems to work now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1149] Optimizer: obsolete array length loads, common subexpr. elimin. not working
http://d.puremagic.com/issues/show_bug.cgi?id=1149 --- Comment #9 from yebblies yebbl...@gmail.com 2012-02-24 00:20:28 EST --- (In reply to comment #8) Better: Yeah. I have no idea why it's using so many registers though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4155] return of NaN to temporary fails equality test
http://d.puremagic.com/issues/show_bug.cgi?id=4155 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||pull CC||yebbl...@gmail.com Platform|Other |x86 AssignedTo|nob...@puremagic.com|yebbl...@gmail.com OS/Version|Windows |All Severity|normal |critical --- Comment #1 from yebblies yebbl...@gmail.com 2012-02-24 01:42:51 EST --- https://github.com/D-Programming-Language/dmd/pull/760 When T is a float or double, and in memory, dmd loads it to gp registers, doubles it, then tests for zero. When it's in ST(0), dmd uses fucompp to test but the code that tests the flags is unaware of this and doesn't check the zero flag to see if it was a nan comparison. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7566] New: compiler works incorrectly when debug{} statements are present, ver 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7566 Summary: compiler works incorrectly when debug{} statements are present, ver 2.057 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: tbo...@gmail.com --- Comment #0 from Timofei Bolshakov tbo...@gmail.com 2012-02-23 07:43:33 PST --- $ more d_compiler_bug_around_debug.d #!/usr/bin/rdmd -debug import std.stdio; void main(){ bool dummy_flag = false; if( dummy_flag ) debug{ writeln(debug print 1); } writeln( Some real action ... ); debug{ writeln(debug print 2); } else{ writeln( Some other action ); } } $ ./d_compiler_bug_around_debug.d Some real action ... debug print 2 $ dmd -v DMD32 D Compiler v2.057 Copyright (c) 1999-2011 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7566] compiler works incorrectly when debug{} statements are present, ver 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7566 --- Comment #1 from Timofei Bolshakov tbo...@gmail.com 2012-02-23 07:46:31 PST --- If debug statements are removed - compiler behave as expected: $ more d_compiler_bug_around_debug.d #!/usr/bin/rdmd -debug import std.stdio; void main(){ bool dummy_flag = false; if( dummy_flag ) writeln(debug print 1); writeln( Some real action ... ); writeln(debug print 2); else{ writeln( Some other action ); } } $ ./d_compiler_bug_around_debug.d ./d_compiler_bug_around_debug.d(10): found 'else' instead of statement ./d_compiler_bug_around_debug.d(13): unrecognized declaration Failed: dmd -debug -v -o- './d_compiler_bug_around_debug.d' -I'.' ./d_compiler_bug_around_debug.d.deps -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7567] New: Lazy quantifiers fail with ctRegex
http://d.puremagic.com/issues/show_bug.cgi?id=7567 Summary: Lazy quantifiers fail with ctRegex Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: beatgam...@gmail.com --- Comment #0 from Jameson beatgam...@gmail.com 2012-02-23 09:30:07 PST --- Overview: ctRegex fails to compile some regular expressions that regex does. Steps to reproduce: The following regular expressions fail with ctRegex, put work with regex compiled at runtime: (a+?)?b (a*?)?b (a{0,}?)?b (a{1,}?)?b Actual Results: I get the following error: /usr/include/d/dmd/phobos/std/regex.d(6486): found 'else' instead of statement Expected results: I expected ctRegex to behave the same as regex, and compile the same set of regular expressions. Build: DMD v2.058 Additional information: The following regular expressions work with both: (a{1,5}?)?b a*?b (a*?)b It seems to be a problem with having a lazy quantifier followed by the ?. I am building a regex to parse URIs: ^(?:(?Pscheme[^:/?#]+):)?(?:(?Pslashes//)?(?Pauthority[^/?#]*?)(?::(?Pport\\d{1,5}))?)?(?Ppath/[^?#]*)(?:\\?(?Pquery[^#]*))?(?:#(?P fragment.*))?$ This works fine with the regex function, but breaks when I use ctRegex. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7566] compiler works incorrectly when debug{} statements are present, ver 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7566 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||INVALID --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-02-23 12:30:38 PST --- I'm not sure what you're expecting, but the compiler behaves correctly in your first example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7399] Broken import statement in trySemantic() causes silent compiler error
http://d.puremagic.com/issues/show_bug.cgi?id=7399 --- Comment #4 from github-bugzi...@puremagic.com 2012-02-23 12:35:47 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/dd65cdc98ef51607aa030bcd5fced838b04d3954 Merge pull request #725 from kennytm/bug7399-import-too-fatal Fix bug 7399: Broken import statement in trySemantic() causes silent compiler error -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6453] Allow multiple invariant per struct/class
http://d.puremagic.com/issues/show_bug.cgi?id=6453 Alex R�nne Petersen xtzgzo...@gmail.com changed: What|Removed |Added CC||xtzgzo...@gmail.com --- Comment #3 from Alex R�nne Petersen xtzgzo...@gmail.com 2012-02-23 12:59:01 PST --- I completely agree with this change; I ran into this exact limitation for the exact same scenario as well. It's rather crippling for template mixins. While on this topic, see also bug #5038. It would be a natural extension of this enhancement IMHO. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7566] compiler works incorrectly when debug{} statements are present, ver 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7566 --- Comment #3 from Timofei Bolshakov tbo...@gmail.com 2012-02-23 13:07:19 PST --- I am expecting to see somewhat like ./d_compiler_bug_around_debug.d(10): found 'else' instead of statement ./d_compiler_bug_around_debug.d(13): unrecognized declaration when compiled with debug key and nothing when compiled without. I believe my expectations are correct ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7399] Broken import statement in trySemantic() causes silent compiler error
http://d.puremagic.com/issues/show_bug.cgi?id=7399 --- Comment #5 from github-bugzi...@puremagic.com 2012-02-23 13:09:23 PST --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1209c9c96696876e406719cb409485a928f91469 fix Issue 7399 - Broken import statement in trySemantic() causes silent compiler error -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7399] Broken import statement in trySemantic() causes silent compiler error
http://d.puremagic.com/issues/show_bug.cgi?id=7399 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7564] Implicit conversion from static to dynamic array in loops
http://d.puremagic.com/issues/show_bug.cgi?id=7564 --- Comment #2 from Sebastian sebastian.sandberg1...@gmail.com 2012-02-23 13:40:11 PST --- Ok, I understand, I was wrong. However on a related matter, I think that, import std.stdio; int[1] f(int i) { int[1] a = i; return a; } void main() { foreach (i; 0 .. 2) { writeln(f(i).ptr); } writeln(f(0).ptr); writeln(f(1).ptr); } prints 703A05E0 703A05E0 703A05E4 703A05E8 is a little bit strange, but I guess that just how it works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7078] BigInt.toInt returns a long
http://d.puremagic.com/issues/show_bug.cgi?id=7078 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from Don clugd...@yahoo.com.au 2012-02-23 14:30:23 PST --- Fixed some time ago. https://github.com/D-Programming-Language/phobos/commit/d619dd513f2f5f7ab2639c34118f03c1672f4485 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6808] string to BigInt using std.conv.to
http://d.puremagic.com/issues/show_bug.cgi?id=6808 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||FIXED --- Comment #2 from Don clugd...@yahoo.com.au 2012-02-23 14:31:12 PST --- Fixed some time ago. https://github.com/D-Programming-Language/phobos/commit/b85e583ad68dcee15c2be3030f3f7090f727e601 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7564] Implicit conversion from static to dynamic array in loops
http://d.puremagic.com/issues/show_bug.cgi?id=7564 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-02-23 14:48:52 PST --- Temporary objects are destroyed ad the scope end, not statement end. (In reply to comment #2) Ok, I understand, I was wrong. However on a related matter, I think that, import std.stdio; int[1] f(int i) { int[1] a = i; return a; } void main() { foreach (i; 0 .. 2) { writeln(f(i).ptr); is same as: auto tmp = f(i); writefln(tmp.ptr); // tmp is destroyed at the end of foreach, so prints same address } writeln(f(0).ptr); writeln(f(1).ptr); are same as: auto tmp1 = f(i); writefln(tmp1.ptr); auto tmp2 = f(i); writefln(tmp2.ptr); // each temporaries has own memory, so prints different address } prints 703A05E0 703A05E0 703A05E4 703A05E8 is a little bit strange, but I guess that just how it works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7374] stdin.byLine() throws AssertError on empty input
http://d.puremagic.com/issues/show_bug.cgi?id=7374 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added CC||and...@metalanguage.com --- Comment #1 from Andrei Alexandrescu and...@metalanguage.com 2012-02-23 16:23:00 PST --- I think https://github.com/D-Programming-Language/phobos/commit/94b21d38d16e075d7c44b53015eb1113854424d0 fixes this, could you please double-check? On OSX the test program works as expected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7566] compiler works incorrectly when debug{} statements are present, ver 2.057
http://d.puremagic.com/issues/show_bug.cgi?id=7566 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #4 from yebblies yebbl...@gmail.com 2012-02-24 13:15:51 EST --- (In reply to comment #3) I am expecting to see somewhat like ./d_compiler_bug_around_debug.d(10): found 'else' instead of statement ./d_compiler_bug_around_debug.d(13): unrecognized declaration when compiled with debug key and nothing when compiled without. I believe my expectations are correct ... The following is valid syntax: debug { } else { } Although I don't think I've ever wanted to use an else block on a debug statement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7569] New: cannot void initialize tuple declarations
http://d.puremagic.com/issues/show_bug.cgi?id=7569 Summary: cannot void initialize tuple declarations Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-02-23 18:24:37 PST --- cat bug.d CODE template Tuple(T...) { alias T Tuple; } void main() { Tuple!(int, int) tup = void; } CODE dmd -c bug bug.d(8): Error: void initializer has no value -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5112] scope is deprecated, but this is not mentioned in the specification
http://d.puremagic.com/issues/show_bug.cgi?id=5112 Jesse Phillips jesse.k.phillip...@gmail.com changed: What|Removed |Added CC||jesse.k.phillip...@gmail.co ||m --- Comment #6 from Jesse Phillips jesse.k.phillip...@gmail.com 2012-02-23 19:09:56 PST --- As Jonathan said, if we know scope for locals is going then it shouldn`t be mentioned. It currently is under Scope Classes http://dlang.org/class.html Related bug: http://d.puremagic.com/issues/show_bug.cgi?id=2120 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4480] JSON: include location range, not just line numbers, for everything
http://d.puremagic.com/issues/show_bug.cgi?id=4480 Matt Peterson revcompg...@gmail.com changed: What|Removed |Added CC||revcompg...@gmail.com --- Comment #1 from Matt Peterson revcompg...@gmail.com 2012-02-23 20:38:09 PST --- DMD doesn't currently store line offset information, so this is a fairly invasive enhancement to do, although I agree it would be very nice to have this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
setlocale not working as expected
Hello, When I use setlocale with LC_ALL it does not seem to work. I use nlb_belgium and, when I print (writeln in console) a floating point number, I expect the decimal separator to be a comma. But it remains a dot. When I use 0 instead of LC_ALL, it does work. So I inspected the values defined for those locale cateory constants and they seem to be completely different from what I find in the Visual C++ headers. Is this possible? I mean, are they not expected to be the same, or is this vendor specific? PS: This is how they are defined in VC: #define LC_ALL 0 #define LC_COLLATE 1 #define LC_CTYPE2 #define LC_MONETARY 3 #define LC_NUMERIC 4 #define LC_TIME 5 Also, in VC++, the return value of setlocale is defined as char* whereas, in D, it is int. This makes it impossible to inspect the current locale. Best regards and thanks for a wondderfull language, Frank De prins