Changes between Initial Version and Version 1 of Ticket #7443


Ignore:
Timestamp:
Apr 12, 2013 7:43:37 PM (2 years ago)
Author:
igloo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7443

    • Property Difficulty changed from to Unknown
  • Ticket #7443 – Description

    initial v1  
    22
    33I also opened a GCC bug for this; but a cursory look seems to indicate this C code is trying to build a linked list in memory, which it seems should be doable in a much more straightforward way. In fact since the list of CAFs will not change in run-time, it should be possible to initialize it in compile time as:
    4 
     4{{{
    55ENTRY entry_0[1] = { ..., link = NULL };
    66ENTRY entry_1[1] = { ..., link = entry_0 };
    77...
    88head = entry_n;
    9 
     9}}}
    1010And this is before wondering why not use an array of entries instead of a linked list in the 1st place. That said, I am just guessing here, I have no understanding of what is really going on, other than the fact I was forced to add {-# OPTIONS_GHC -optc -O0 #-} to the offending file.
    1111