Should C functions automatically be nothrow?
newshound2 at digitalmars.com
Tue Feb 7 11:53:45 PST 2012
On 2/7/2012 5:40 AM, Stewart Gordon wrote:
> On 07/02/2012 02:04, Jonathan M Davis wrote:
>> Can C functions throw? I don't know of any way that a C function could throw.
> On top of what the others have said, functions written in C can certainly throw
> such things as AVs.
Although seg faults are converted into D exceptions on Windows by druntime, and
so can be caught, I suspect this was not a good idea. It's completely
non-portable to other systems.
Nor would C code do such a conversion anyway.
More information about the Digitalmars-d