You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// cat a.h
struct a { char c1, c2; };
struct s {
char par[__builtin_offsetof(struct a, c2)];
char c;
};
// cat A.chs
module A where
$ gtk2hsC2hs --precomp=a.bin --output=a.hs a.h A.chs
gtk2hsC2hs: c2hs/c/CNames.hs:(162,1)-(180,71): Non-exhaustive patterns in function naCExpr
$ gcc -c a.h # builds fine
The original issue is rather weird, it's a dev-haskell/glib build failure on ia64: https://bugs.gentoo.org/show_bug.cgi?id=498638#c18
Don't understand why original issue is specific only for ia64. Looks quite generic.
But this reproduces crashes fine on amd64 :)
The request:
at least print out precise location of problematic expression in .i file so it would be clear what can't be parsed.
and ideally make it work :)
Thanks!
The text was updated successfully, but these errors were encountered:
@trofi Oh dear. I'll have to take a look at what the current status of gtk2hsC2hs is, but there was a schism between the gtk2hs tools and the main C2HS branch years ago, before I even got involved in maintaining C2HS. I'll have a look, but I think you might be out of luck there. gtk2hsC2hs is part of gtk2hs-buildtools: http://hackage.haskell.org/package/gtk2hs-buildtools
A quick check with the "real" C2HS seems to indicate that this might have been fixed at some point, but the fix never made it into the gtk2hs tools.
Ah, sorry! c2hs is indeed prints a better error message.
Don't understand why original issue is specific only for ia64
Another mystery is resolved: the original ucontext.h is platform-secific.
Most of other platforms don't use offseof, thus no bug.
It's hard to imagine sane offsetof implementation, thus i'll close the bug.
Don't worry! I think it took me some months after I started doing maintenance on C2HS to even realise that the gtk2hs version was a completely different beast...
Reproducer:
The original issue is rather weird, it's a
dev-haskell/glib
build failure on ia64: https://bugs.gentoo.org/show_bug.cgi?id=498638#c18Don't understand why original issue is specific only for ia64. Looks quite generic.
But this reproduces crashes fine on amd64 :)
The request:
.i
file so it would be clear what can't be parsed.Thanks!
The text was updated successfully, but these errors were encountered: