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

Fixes for C99 compatibility #100

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

fweimer-rh
Copy link

This will allow building with compilers that diagnose some C99 constraint violations as errors instead of warnings.

Implicit ints  have not been part of C since 1999, and future
compilers will disable support for them by default.  Fortunatenly,
only one configure check needs adjusting.
Otherwise, the check fails on a compiler which does not support
implicit function declarations (a language feature removed in 1999).
Incompatible pointer types are actually errors (in the sense
that they are invalid C).  Compilers have merely tolerated them as
warnings for backwards compatibility.  This is changing with Clang 16
and GCC 14, so relax the check a little.
lemenkov pushed a commit to lemenkov/fvwm that referenced this pull request Jan 21, 2024
Do not check that the compiler supports implicit ints without errors.
Add a missing #include <unistd.h>.

Submitted upstream: <fvwmorg#100>

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
lemenkov pushed a commit to lemenkov/fvwm that referenced this pull request Jan 21, 2024
Incompatible pointer types are actually errors (in the sense
that they are invalid C).  Compilers have merely tolerated them as
warnings for backwards compatibility.  This is changing with Clang 16
and GCC 14, so relax the check a little.

Submitted upstream: <fvwmorg#100>

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
@lquidfire
Copy link

In support of this PR:

In Archlinux (currently GCC 14.1), FVWM did not build anymore, due to these warnings now being marked as errors.

I was able to build FVWM by adding the following CFLAGS during configure: "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types". See also the this post on Archlinux forums.

@somiaj
Copy link
Contributor

somiaj commented May 12, 2024

Note, fvwm is no longer supported, 2.7.0 is the final release. It will probably be up to maintainers to either have local patches or fixes from here on out to keep fvwm building. Though keeping PRs like this open can help users find ways to fix issues they run into. (note maybe if enough of these pile up we might merge them).

@lquidfire
Copy link

Perfect, I used local patches. Definitely grateful for PRs as they do help to fix issues.

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

Successfully merging this pull request may close these issues.

3 participants