-
Notifications
You must be signed in to change notification settings - Fork 8
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
Incomplete type analysis? #6
Comments
Thanks! The issue stems from the following macro:
This macro is used to duplicate API macro arguments (elements or keys) and pass a pointer to the duplicate into a container function. In other words, it mimics by-value-argument-passing in a manner that allows us to still circumvent C's type system by using The compiler is rightfully warning that I think compilers should generate an error here, especially with I'm not sure there's a way to force an error, but I'll think about, especially because I'm already in the process of refactoring the library for better compile speed. But a warning might have to suffice. There is at least one other instance wherein the library generates warnings for incorrect usage where an error would be better (namely passing a |
By the way, I should also point out that your hash function |
For the following program which is faulty (it gives an integer instead of a structure as argument of the map for the insert call),
the compilation succeeds with some "missing braces around initializer [-Wmissing-braces]" warnings
whereas I was expecting a compilation failure or at least a warning about incompatible pointer.
The text was updated successfully, but these errors were encountered: