Apologies for reviving an old thread, but I'm revisiting this issue, trying
to see if I can patch a way around it, without having to constant-fold
floating point numbers.
Looking at the suggested line (line 2656 of src/cil.ml), it does not look
like that particular code should be throwing the error that I'm seeing,
because it checks if the type of the result is either an int or a float
(using 'integralType' on line 2650). Indeed, the error that I am seeing is
the following:
C:/../testGlobalInit-gt.c:5: Bug: newTempVar called outside a function
C:/../testGlobalInit-gt.c:5: Error: global initializer
Are there any suggestions on how to get this to work? Ideally, I guess I'm
looking for a way for expressions involving floating-point values to just
'go through' without any changes and constant foldings, but it looks like
that's already happening.
On 6 August 2013 23:22, Jonathan Kotker <advancedvers...@gmail.com> wrote:
> Ah okay, thanks, Gabriel. I will try to work around this then.
>
>
> On 6 August 2013 23:15, Gabriel Kerneis <gabr...@kerneis.info> wrote:
>
>> On Wed, Aug 07, 2013 at 07:13:17AM +0100, Gabriel Kerneis wrote:
>> > You could try and patch src/cil.ml around line 2570 to handle that case
>>
>> Line 2656 and following actually (constFoldBinOp).
>>
>> --
>> Gabriel
>>
>
>
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users