Re: Discussion about why GNU/Linux system upgrades cause old programs to break

Arsen Arsenović <[email protected]> Thu, 13 Aug 2026 00:39:10 +0200
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
Arsen Arsenović <[email protected]> writes:

> But, gcc allows you to recover the old behavior (of permitting cetain
> K&R constructs in C99 and onwards) also, by passing:
>
>   -Wno-error=implicit-function-declaration
>   -Wno-error=declaration-missing-parameter-type
>   -Wno-error=return-mismatch
>   -Wno-error=int-conversion
>   -Wno-error=incompatible-pointer-types
>
> I'm not convinced this suffices to restore compatibility, though.
> Mostly because I suspect most of these programs would've also broken
> with GCC 13.

Not sure how it slipped my mind but, obviously, these are covered by
-fpermissive.  Quoting (gcc) Warning Options:

> ‘-fpermissive’
>      Downgrade some required diagnostics about nonconformant code from
>      errors to warnings.  Thus, using ‘-fpermissive’ allows some
>      nonconforming code to compile.  Some C++ diagnostics are controlled
>      only by this flag, but it also downgrades some C and C++
>      diagnostics that have their own flag:
> 
>           -Wabbreviated-auto-in-template-arg (C++ and Objective-C++ only)
>           -Wdeclaration-missing-parameter-type (C and Objective-C only)
>           -Wimplicit-function-declaration (C and Objective-C only)
>           -Wimplicit-int (C and Objective-C only)
>           -Wincompatible-pointer-types (C and Objective-C only)
>           -Wint-conversion (C and Objective-C only)
>           -Wnarrowing (C++ and Objective-C++ only)
>           -Wreturn-mismatch (C and Objective-C only)
>           -Wtemplate-body (C++ and Objective-C++ only)
> 
>      The ‘-fpermissive’ option is the default for historic C language
>      modes (‘-std=c89’, ‘-std=gnu89’, ‘-std=c90’, ‘-std=gnu90’).

-- 
Arsen Arsenović
signature.asc (application/pgp-signature, 288 B)
-----BEGIN PGP SIGNATURE-----

iKIEARYKAEoWIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCanz2DhsUgAAAAAAEAA5t
YW51MiwyLjUrMS4xMiwyLDIQHGFyc2VuQGFhcnNlbi5tZQAKCRBSwpQwHqLEk+s7
AQCqeAd3bkT8Lr2MQa7TeSA3mqDrpA/zgYCgLe2vVqQonwEA4/qpk2jl7d1972lM
bDwi153aJldg4ejVBDGDSTfjPQ8=
=/VWq
-----END PGP SIGNATURE-----