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
GCC14 c99 - fails to compile (error: assignment to 'GFile *' {aka 'struct _GFile *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types])GCC14 c99 - #693
Comments
Bug persists in pluma-1.26.1 |
C99 is a very old standard we are not really concerned with, it doesn't like "mixed declarations and code." Your patch has the downside of removing initialization of these variables, and would thus need new lines to add that back. In general we are not going to revise all the rest of our code to support the obsolete C99 standard.
|
What. It's your patch. From your repository. That's in 1.27.0 and 1.28.0 |
This looks like reducing the scope of variables as advised by cppcheck. Find out why you are compiling with the old C99 standard
and don't use any options to treat this warning as an error and see what happens.
|
https://inbox.sourceware.org/gcc-patches/cover.1700473918.git.fweimer@redhat.com/ |
I do not have gcc 14 and also have no experience setting nondefault CFLAGS or build options concerning warnings
, so I might have to leave this for the rest of the team.
|
Looking more closely: this seems to be a simple cherrypick of something we did and evaluated before. The c99 reference basically threw me off of this, as I normally ignore anything that is C99 only. An incompatable pointer type is a whole different issue though, and this should be fixable with a cherrypick to 1.26. I had mistaken this for an issue against current master and 1.28 |
Thanks for cherrypicking with |
Translations broke on updating for 1.26.2, so I have to revert that update and release 1.26.3 using the same translations as 1.26.1. Version 1.26.3 with the fix for this included is out and available to distros, so we should be finished with this. Feel free to reopen or to open a new report if gcc-3.14 issues persist |
With the upcoming changes to GCC14 now adding ModernC like LLVM16 did Pluma-1.26.1 fails to compile although the issue is already resolved in 1.27.0.
pluma-file-bookmarks-store.c: In function 'pluma_file_bookmarks_store_get_uri':
pluma-file-bookmarks-store.c:853:22: error: assignment to 'GFile *' {aka 'struct _GFile *'} from incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types]
853 | file = g_object_ref (obj);
| ^
make[4]: *** [Makefile:614: pluma-file-bookmarks-store.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-editors/pluma-1.26.0-r2/work/pluma-1.26.0/plugins/filebrowser'
make[4]: *** Waiting for unfinished jobs....
Steps to reproduce:
Compile pluma-1.26.1 with the latest GCC14 snapshot or if using pre 14 then adding
-Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types
to the compiler flags will do the same thingThis is currently being tracked as a Gentoo bug at https://bugs.gentoo.org/919088
The text was updated successfully, but these errors were encountered: