[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update

Jan Ekholm wrote:

>>When I try to compile PFile, my compiler hangs. Yes, that's right,
>>hangs. I have to stop it manually, and then the files it was compiling
>>will be locked for a minute or so. Veeeeeery annoying.
>This can happen (I think) if you have circular references that are not
>dynamically allocated, such as:


We don't have such code. I already encountered similar problems in the past
and as result of that became *very* careful regarding circular references

>// forward declaration
>class B;
>class A {
>  // members
>  B  aB;
>class B {
>  // members
>  A anA;
>I think this could cause the problem. The compiler just expands the
>members recursively, leading into infinite recursion. The compiler eats
>memory and CPU. You could change (if this is the problem) one of the

At least g++ won't compile that at all, as it performs only one one pass
over the code, and thus doesn't know the exact size (and structure) of B at
the time of the instantiation in A.


Daddy what does "FORMATING DRIVE C" mean?