Skip to content
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

UndefVarError when encountering #define used to rename function #468

Open
topolarity opened this issue Jan 31, 2024 · 1 comment
Open

UndefVarError when encountering #define used to rename function #468

topolarity opened this issue Jan 31, 2024 · 1 comment
Labels

Comments

@topolarity
Copy link

It's not uncommon for C libraries to use #define to rename a function:

// test.h
#define fprintf sh_fprintf

but this will generate an invalid const definition:

module TestModule

const fprintf = sh_fprintf

end # module

It seems like Clang.jl needs to keep track of the identifiers here maybe?

@Gnimuc Gnimuc added the macro label Feb 1, 2024
@Gnimuc
Copy link
Member

Gnimuc commented Feb 1, 2024

agreed. maybe LLMs can do better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants