Suspicious C Compiler warning in Spur garbage collector

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Suspicious C Compiler warning in Spur garbage collector

Nicolas Cellier
 
Here is the raw complaint:

../../spur64src/vm/gcc3x-cointerp.c:18467:28: warning: implicit conversion from 'double' to 'sqInt' (aka 'long long') changes value from 0.9 to 0 [-Wliteral-conversion]
        GIV(tenuringProportion) = 0.9;
Reply | Threaded
Open this post in threaded view
|

Re: Suspicious C Compiler warning in Spur garbage collector

Eliot Miranda-2

Hi Nicolas,

_,,,^..^,,,_ (phone)

> On Jul 20, 2016, at 9:44 AM, Nicolas Cellier <[hidden email]> wrote:
>
> Here is the raw complaint:
>
> ../../spur64src/vm/gcc3x-cointerp.c:18467:28: warning: implicit conversion from 'double' to 'sqInt' (aka 'long long') changes value from 0.9 to 0 [-Wliteral-conversion]
>         GIV(tenuringProportion) = 0.9;

tenuringProportion should be defined as having type double in the class-side #declareCVarsIn: in the class that defines the inst var (SpurGenerationScavenger or SpurMemoryManager).
Reply | Threaded
Open this post in threaded view
|

Re: Suspicious C Compiler warning in Spur garbage collector

Nicolas Cellier
 
Hi Eliot,
effectively, I see no code for declaring this inst. var. type, so it must default to sqInt...
I'm about to commit.

2016-07-20 17:19 GMT+02:00 Eliot Miranda <[hidden email]>:

Hi Nicolas,

_,,,^..^,,,_ (phone)

> On Jul 20, 2016, at 9:44 AM, Nicolas Cellier <[hidden email]> wrote:
>
> Here is the raw complaint:
>
> ../../spur64src/vm/gcc3x-cointerp.c:18467:28: warning: implicit conversion from 'double' to 'sqInt' (aka 'long long') changes value from 0.9 to 0 [-Wliteral-conversion]
>         GIV(tenuringProportion) = 0.9;

tenuringProportion should be defined as having type double in the class-side #declareCVarsIn: in the class that defines the inst var (SpurGenerationScavenger or SpurMemoryManager).