-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser produces unhelpful error message near .gh include #46
Comments
The only use case for both real and ghost includes that we have ever considered is header files, where the includes are at the top of the file without other preprocessor directives or program declarations intervening. If your intention is that Except that ghost headers can include only ghost headers and ghost headers cannot declare typedefs. I guess one way for us to fix this would be to allow real includes inside ghost headers but check at the point where the ghost header is included that the real headers included by the ghost header were already included earlier and therefore the real includes inside the ghost header are no-ops (assuming all headers have proper header guards). I opened #47 to track this. The workaround is to turn the ghost header into a real header. If, however, you intend |
Thanks for the detailed explanation, Bart! It is actually quite easy for me to fix (there is no parametricity or anything; I just put that into the example for the bug report). So I think I would be perfectly happy with a better error message if that is easily possible. |
Oh, OK. I'm reopening the issue to track that. |
If I have some non-ghost statements (directly?) before an include of a .gh file I always get a parser error (without any useful hint as to what is going on).
example.c:
typedef int int_t;
//@ #include "example.gh"
and an empty example.gh.
The text was updated successfully, but these errors were encountered: