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
Trying to c2hs the following Foo.chs fails with "The phrase '.' is not allowed here." I want to get back 10. Replacing #sizeof with #offsetof causes c2hs to succeed. I think #sizeof should evaluate similarly to sizeof in C++ (sizeof(Foo::bar)). (I don't know how it can be done straightforwardly in C.)
/* Foo.h */
struct Foo {
char bar[10];
};
-- Foo.chs
#include "Foo.h"
module Foo where
sizeOfFooBar :: Int
sizeOfFooBar = {#sizeof Foo.bar#}
The text was updated successfully, but these errors were encountered:
Trying to c2hs the following Foo.chs fails with "The phrase '.' is not allowed here." I want to get back 10. Replacing #sizeof with #offsetof causes c2hs to succeed. I think
#sizeof
should evaluate similarly tosizeof
in C++ (sizeof(Foo::bar)
). (I don't know how it can be done straightforwardly in C.)The text was updated successfully, but these errors were encountered: