[jhc] foreign ptr bugs
john at repetae.net
Thu Dec 30 02:22:55 CET 2010
On Wed, Dec 29, 2010 at 4:45 PM, Korcan Hussein <korcan_h at hotmail.com> wrote:
> Hi I mentioned this briefly in the past before, there is a bug when there are
> multiple foreign pointers in the same lexical scope obtained from (different)
> foreign binding functions. The pointer values end up having the same address
> this typically happens when GCC optimizations are enabled for which most of
> the time I can make code work correctly by adding -fdebug option to jhc.
Hmm... that is strange. I am actually working on the foreign pointer
implementation at the moment in order to get them to play nicely with the new
garbage collector. I'll have to see if I can reproduce this bug.
> Another problem I've been having is erroneous C code generated with the same
> test code when I set the flag "-fno-global-optimize".
Hmm.. I have not tested that flag in a while, I'll check if it still should
work and add it to the regression tests if it is something I intend to support
> I'm using fedora, jhc-0.7.6
Have you tried with the latest darcs version of jhc? I fixed a couple bugs in
the code generator, I don't think any would be causing this directly, but it is
More information about the jhc