perl-tk icon indicating copy to clipboard operation
perl-tk copied to clipboard

Avoid implicit ints and implicit function declarations

Open fweimer-rh opened this issue 2 years ago • 3 comments

These language features have been removed from C in 1999. Future compilers are likely to stop accepting these constructs by default.

Related to:

  • https://fedoraproject.org/wiki/Changes/PortingToModernC
  • https://fedoraproject.org/wiki/Toolchain/PortingToModernC

fweimer-rh avatar Feb 24 '23 10:02 fweimer-rh

I concur that these issues should be addressed, as #79 and #80 are alternative approaches for some of them (e.g. adding #include <stdlib.h> rather than replacing exit(…) with return …).

Also note that if Perl/Tk ever intends to build with -std=c2x or later, then K&R-style definitions will have to be removed entirely.

chrstphrchvz avatar Feb 24 '23 15:02 chrstphrchvz

It looks like a big part of the issue is actually just bundling a decrepit code copy of tk.

eli-schwartz avatar Apr 11 '24 03:04 eli-schwartz

For the record, I needed the patch attached to https://bugzilla.opensuse.org/show_bug.cgi?id=1225909#c1 to make openSUSE perl-tk build without -fpermissive with GCC 14. In the end, I decided to use only the configuration options of the patch (mainly because apparently the configuration mechanism was not passing the option to GCC when compiling its snippets and so they are necessary) and rely on -fpermissive for the rest in order not to introduce too much divergence from upstream.

jamborm avatar Jul 03 '24 18:07 jamborm