[Issue 3443] Thread.thread_needLock() should be const pure nothrow

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3443



--- Comment #2 from David Simcha dsim...@yahoo.com 2009-10-31 13:31:10 PDT ---
Good enough.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3460] New: Allow calllng of class c'tors through methods other than new

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3460

   Summary: Allow calllng of class c'tors through methods other
than new
   Product: D
   Version: 2.035
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha dsim...@yahoo.com 2009-10-31 13:30:16 PDT ---
There used to be a way (described here) to allocate class instances using
custom allocation schemes, without modifying the code to the actual class. 
Apparently, calling f._ctor(args) doesn't work anymore.  Please start allowing
this again, as I really need it to create a method of allocating class
instances w/ the new precise heap scanning stuff I'm working on.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3460] Allow calllng of class c'tors through methods other than new

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3460


David Simcha dsim...@yahoo.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #1 from David Simcha dsim...@yahoo.com 2009-10-31 13:38:16 PDT ---
Never mind, I just realized it's __ctor and it only works if the class has a
constructor.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3461] New: Unittests and assert don't work at all

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3461

   Summary: Unittests and assert don't work at all
   Product: D
   Version: 1.050
  Platform: x86_64
OS/Version: Mac OS X
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: uewyr...@sogetthis.com


--- Comment #0 from uewyr...@sogetthis.com 2009-10-31 14:43:31 PDT ---
Executables compiled with dmd -unittest don't run unit tests at all.

assert() is checked at compile time (i.e. assert(0) triggers warnings about
unreachable code), but has no effect at run time (tried compiling with -debug).

Both 1.050 and 1.048 fail on Snow Leopard (32-bit kernel mode). 2.035 with same
code, same switches runs the tests.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3422] ICE(cgcod.c) Structs with default initializers bigger than register size cannot be default parameters

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3422


Kosmonaut kosmon...@tempinbox.com changed:

   What|Removed |Added

 CC||kosmon...@tempinbox.com


--- Comment #4 from Kosmonaut kosmon...@tempinbox.com 2009-10-31 21:30:25 PDT 
---
Fixed in SVN Repository: http://www.dsource.org/projects/dmd/changeset/230

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3458] int fsync(int) commented out in core.sys.posix.unistd

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3458



--- Comment #2 from Leandro Lucarella llu...@gmail.com 2009-10-31 21:32:28 
PDT ---
I think fsync() is pretty common in all posix OSs, and it's essential to do any
crash-resistant I/O.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3429] Core dump on passing template literal to member function.

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3429


Kosmonaut kosmon...@tempinbox.com changed:

   What|Removed |Added

 CC||kosmon...@tempinbox.com


--- Comment #3 from Kosmonaut kosmon...@tempinbox.com 2009-10-31 21:39:12 PDT 
---
Relevant SVN repository: http://www.dsource.org/projects/dmd/changeset/231

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3462] New: Add a clean way to exit a process.

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3462

   Summary: Add a clean way to exit a process.
   Product: D
   Version: 2.035
  Platform: All
OS/Version: All
Status: NEW
  Keywords: patch
  Severity: enhancement
  Priority: P2
 Component: druntime
AssignedTo: s...@invisibleduck.org
ReportedBy: llu...@gmail.com


--- Comment #0 from Leandro Lucarella llu...@gmail.com 2009-10-31 21:46:07 
PDT ---
Created an attachment (id=485)
druntime patch (against svn r185)

Maybe I'm missing something, but I can't find any standard way to exit a
program cleanly. I can't just call C's exit() function because the stack
doesn't get unwinded so scope guards and other finally blocks are not executed.
This is bad if you want to do some cleanup. In my particular case, I create a
lock file so other instances of a program exit immediately if the lock file is
present, and I want to remove the lock file as soon as the program finishes. I
want to be able to call some exit() function in any part of the program for
simplicity though.

I hacked a solution by adding all the program inside a try block, catching an
special Exit exception with a status attribute. If that exception is catched,
the program returns the exception's status code.

I think this is an useful feature that deserves being in the standard library,
and for that we need runtime support (that's why I added it to the druntime
component instead of Phobos, even when Phobos should be hacked too.

Attached are patches for druntime and phobos with this changes:

druntime:
* Add a ProcessExit class to core.exception module (inherits from Object since
it's not a real exception and we don't want people catching it even when doing
a catch (Throwable)).
* Catch the new exception in tryExec() nested funtion from dmain2.d, even when
rt_trapExceptions is false (again, because is not really an exception), making
the status attribute the new program's exit code.

phobos:
* Add a new void std.process.exit(int status). All it does is throw new
ProcessExit(status); to hide implementation details.

I don't know if std.process is the better module, maybe it should go somewhere
else.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3462] Add a clean way to exit a process.

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3462



--- Comment #1 from Leandro Lucarella llu...@gmail.com 2009-10-31 22:18:41 
PDT ---
Created an attachment (id=486)
phobos patch (against svn r1316)

BTW, you can apply the patches with:

path/to/repo/trunk$ patch -p1  patch

in the root directory of the svn repo.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3462] Add a clean way to exit a process.

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3462



--- Comment #2 from Leandro Lucarella llu...@gmail.com 2009-10-31 22:26:43 
PDT ---
If this is accepted, I guess the discussion in this thread should be revised:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=99432

Personally I think:


try {
// code
}
catch {
// code
}


Should be a shortcut to:


try {
// code
}
catch (Exception) {
// code
}


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3432] ICE(e2ir.c): casting template expression

2009-10-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3432


Leandro Lucarella llu...@gmail.com changed:

   What|Removed |Added

 CC||llu...@gmail.com


--- Comment #3 from Leandro Lucarella llu...@gmail.com 2009-10-31 22:47:13 
PDT ---
SVN commit: http://www.dsource.org/projects/dmd/changeset/232

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---