[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Hidden bugs in Objective-C packages due to language standard mismatch



GCC 14 promoted certain warnings to errors but these do not affect
Objective-C packages.  The GNU Objective-C compiler does not define
__STDC_VERSION__ meaning that the C standard in effect is gnu89:
-Wimplicit-function-declaration [1], -Wincompatible-pointer-types,
etc. remain just warnings.  (FWIW, clang does the opposite: it sets
-std=gnu11 for Objective-C code but even with -std=gnu17 these remain
just warnings.)

I have rebuilt 64 packages (62 GNUstep + 2 non-GNUstep) with
-std=gnu17 and the result was 15 FTBFS bugs.  I attach a list with the
affected packages at the end of the message.

Can we have authoritative answers from a relase team member to the
following questions:

A. Should we consider these bugs and if so, what severity?

B. If the answer to A is positive, should we enforce -std=gnu17 when
   building Objective-C code to align with the C world [2]?  Of course
   this would mean that these bugs will become RC as soon as the
   change lands in unstable.

C. If the answer to B is positive, which is the most suitable package
   to enforce the standard:
   * gnustep-make (either as DEB_OBJCFLAGS_MAINT_APPEND definition in
     /usr/share/GNUstep/debian/config.mk or injecting -std=gnu17 in
     the rules).  Not all GNUstep packages use gnustep-make and of
     course non-GNUstep Objective-C packages don't.
   * dpkg (in OBJCFLAGS).  Not all packages honor dpkg's buildflags
     although these cases should be considered bugs, IMHO.
   * GCC?

[1] -Wimplicit-function-declaration is not a problem because even if
    it's only a warning, the package will fail at link time with
    "undefined reference to `function'".
[2] Objective-C is a strict superset of C so any sanity/security
    concerns that apply for C apply equally so for Objective-C.

Debian GNUstep maintainers <pkg-gnustep-maintainers@lists.alioth.debian.org>
   chess.app               [-Wincompatible-pointer-types]
   fontmanager.app         [-Wincompatible-pointer-types]
   gnustep-examples        [-Wincompatible-pointer-types]
   gnustep-gui             [-Wincompatible-pointer-types]
   gnustep-sqlclient       [-Wint-conversion]
   gorm.app                [-Wincompatible-pointer-types]
   gridlock.app            [-Wint-conversion]
   grr.app                 [-Wincompatible-pointer-types]
   helpviewer.app          [-Wint-conversion]
   mpdcon.app              [-Wincompatible-pointer-types]
   price.app               [-Wincompatible-pointer-types]

Debian SOGo Maintainers <pkg-sogo-maintainers@lists.alioth.debian.org>
   sogo                    [-Wint-conversion]
   sope                    [-Wincompatible-pointer-types]

Eric Heintzmann <heintzmann.eric@free.fr>
   addresses-for-gnustep   [-Wint-conversion]

Jonathan Schleifer <js@nil.im>
   objfw                   [-Wincompatible-pointer-types]
                           (package uses clang so required setting
                           -Werror= to imitate GCC behavior)


Reply to: