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

clang 16 build failure, incompatible function pointer types #61

Open
chenrui333 opened this issue Jul 21, 2024 · 1 comment
Open

clang 16 build failure, incompatible function pointer types #61

chenrui333 opened this issue Jul 21, 2024 · 1 comment

Comments

@chenrui333
Copy link

while regression build valabind, found some incompatible function pointer types with newer clang

  gowriter.vala:865:34: error: incompatible function pointer types passing 'void (gconstpointer, gconstpointer, gpointer)' (aka 'void (const void *, const void *, void *)') to parameter of type 'GHFunc' (aka 'void (*)(void *, void *, void *)') [-Wincompatible-function-pointer-types]
                  g_hash_table_foreach (_tmp13_, ____lambda9__gh_func, _data3_);
                                                 ^~~~~~~~~~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/ghash.h:114:61: note: passing argument to parameter 'func' here
                                              GHFunc          func,
                                                              ^
  1 error generated.
  vlangwriter.vala:778:34: error: incompatible function pointer types passing 'void (gconstpointer, gconstpointer, gpointer)' (aka 'void (const void *, const void *, void *)') to parameter of type 'GHFunc' (aka 'void (*)(void *, void *, void *)') [-Wincompatible-function-pointer-types]
                  g_hash_table_foreach (_tmp13_, ____lambda6__gh_func, _data6_);
                                                 ^~~~~~~~~~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/ghash.h:114:61: note: passing argument to parameter 'func' here
                                              GHFunc          func,
                                                              ^
  1 error generated.

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10029422228/job/27717614528?pr=177971
relates to Homebrew/homebrew-core#177971

@trufae
Copy link
Collaborator

trufae commented Jul 23, 2024

Looks like a bug in the vala compiler vapi files to me, not sure how can I cast a different function signature for a lambda

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

No branches or pull requests

2 participants