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

'less' should port to C23 by using function prototypes #316

Closed
eggert opened this issue Dec 26, 2022 · 1 comment
Closed

'less' should port to C23 by using function prototypes #316

eggert opened this issue Dec 26, 2022 · 1 comment

Comments

@eggert
Copy link
Contributor

eggert commented Dec 26, 2022

One of the changes in the 2023 edition of the C standard is that support for K&R style function definitions has been removed. Since 'less' still uses these, it won't compile on a vanilla C23 compiler. And since nobody cares about pre-C89 compilers any more, the simplest fix is for 'less' to use C89-style function prototypes everywhere. It is 33 years after C89, after all.

GCC optionally warns about these obsolete usages; see attached build transcript.I expect some compilers will start erroring out entirely soon.

lessbug.txt

@gwsw
Copy link
Owner

gwsw commented Dec 29, 2022

I agree that it's time to do this.
Fixed in 76a7805 (less-618).

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 a pull request may close this issue.

2 participants