OSNews article about C++09 degenerates into C++ vs. D discussion
Alexander Panek
a.panek at brainsware.org
Mon Nov 27 07:44:36 PST 2006
Arr!
gdc -c, of course.
Alexander Panek wrote:
> %u, (:P)
>
> as soon as you compile to object files and do the linking yourself, you
> are in any way getting undefined references to some GC functions, as
> soon as you try to use GC-enabled features, anyways. And as this thread
> is about OSnews discussions, in OS development, you *do* link yourself
> anyways (gcc -c, ld -Tlinker-script).
>
> Kind regards,
> Alex
>
> %u wrote:
>>>>> No? Hypothetical: your boss dumps a million lines of D code in your
>>>>> lap and says,
>>>>> "Verify that this avoids the GC in all possible circumstances".
>>>>> What do you do?
>>>>> What do you grep for? What tests do you run?
>>>> I'd probably begin by hooking the GC collection routine and dumping
>>>> data
>>>> on what was being cleaned up non-deterministically.
>>> 1. If possible, relink without the GC library. If that fails, it
>>> doesn't necessarily mean the GC gets used, so relink with
>>> the GC library patched so that any attempt to allocate memory from
>>> the GC heap fails with a loud noise.
>>>
>>> 2. Run all unit tests, and check that full coverage is achieved.
>>> Of course that assumes that there *are* unit tests...
>>
>>
>> It should be as simple as choosing a compile option
>> and letting the compiler complain the use of GC.
More information about the Digitalmars-d
mailing list