vala: work around clang 16 function pointer errors#252484
Merged
vcunat merged 1 commit intoNixOS:stagingfrom Sep 28, 2023
Merged
vala: work around clang 16 function pointer errors#252484vcunat merged 1 commit intoNixOS:stagingfrom
vcunat merged 1 commit intoNixOS:stagingfrom
Conversation
Mindavi
reviewed
Sep 7, 2023
Contributor
There was a problem hiding this comment.
I think it's fine to have this globally for all compilers instead of constraining it to clang.
Contributor
Author
There was a problem hiding this comment.
It looks like this flag is supported by all clang and GCC versions available in nixpkgs. I’ll rework to make it apply unconditionally.
Contributor
Author
There was a problem hiding this comment.
I pushed an update that adds the flag unconditionally and contains the changes to the setup hook.
Clang 16 makes casting function pointers between incompatible types an error, which causes Vala to fail to build things using glib-2.0.vapi. `-Wno-incompatible-function-pointer-types` is set unconditionally because it is supported by all versions of clang and GCC in nixpkgs. See https://gitlab.gnome.org/GNOME/vala/-/issues/1413.
Member
|
This appears to spam GIMP build with: Also, |
13 tasks
Member
|
Seems like upstream added its own meassure to silence those warnings. I think these hook could be removed now. Could you help with testing @reckenrode? |
fabianhjr
added a commit
that referenced
this pull request
Aug 2, 2024
…errors Hook accumulates the flag over sereval executions as observed in: - #301592 - #252484 (comment) Since this has been committed, gcc started emitting a warning on `-Wno-incompatible-function-poniter-types` being an unrecognized flag and additionally upstream vala added its own meassure to reduce these new pointer errors to warnings in its generated sources. https://gitlab.gnome.org/GNOME/vala/-/commit/23ec71b1a5c4cead3d1bdac82e184d0a63fa7b79 Which is part of the current release branch (https://gitlab.gnome.org/GNOME/vala/-/commits/0.56?ref_type=heads) and released on 0.56.15 ``` Vala 0.56.15 ============ * Various improvements and bug fixes: - codegen: ... + Emit diagnostic pragmas for GCC 14, Clang 16 compatibility [#1408] ``` https://gitlab.gnome.org/GNOME/vala/-/merge_requests/369
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Clang 16 makes casting function pointers between incompatible types an error, which causes Vala to fail to build things using glib-2.0.vapi.
See https://gitlab.gnome.org/GNOME/vala/-/issues/1413.
I tested that libsecret built using Vala with this patch and a clang 16 stdenv from #241692.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)