[Issue 11176] array.ptr in @safe code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 5 18:02:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11176



--- Comment #5 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-10-05 18:02:00 PDT ---
> I think you are missing something here: A C function taking an array by 
> pointer and length or a pointer to a zero-terminated array can never be 
> @trusted.

Ah, that would be true. So, regardless of ptr, it's a problem. Though with
druntime using @trusted: on whole modules in some places, I find it hard to
believe that we're not screwing this up in several places. And with so many C
functions taking pointers of one variety of another (combined with the fact
that we don't have the actual source code for C functions normally), I'd be
tempted to argue that marking C functions with @trusted should simply not be
done under normal circumstances.

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


More information about the Digitalmars-d-bugs mailing list