eserte / perl-tk

the perl module Tk
https://metacpan.org/release/Tk
Other
44 stars 31 forks source link

Avoid implicit ints and implicit function declarations #91

Open fweimer-rh opened 1 year ago

fweimer-rh commented 1 year ago

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

Related to:

chrstphrchvz commented 1 year ago

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.

eli-schwartz commented 5 months ago

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

jamborm commented 2 months ago

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.