-
Notifications
You must be signed in to change notification settings - Fork 245
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
Missing declarations runner #1921
base: main
Are you sure you want to change the base?
Conversation
6cb2109
to
1ac99c2
Compare
I would really prefer to just insert more forward declarations instead of littering the codebase with pragmas except in very special circumstances. |
How about |
I don't see the need. Nothing prevents us from declaring "global private" functions in the existing headers. |
Ah, sorry. I have no objection to this. Will do this instead. |
Currently we have functions that are declared as global functions, but miss declarations in headers. Now, some may be missed in headers, other should be converted to static functions. Compiling with
-Wmissing-prototypes
shows which ones it is.Doing this can show which ones should actually be local/static and which ones may miss a declaration in a header. On the other hand, if a helper function defined as a global function is no longer used, but still defined, it will still be compiled and take up space in the binary and in the source code. Hence, we should aim to cover the whole library with this compiler flag (will probably take years to fix this, thought).
Some files are problematic, such as
inlines.c
, but an easy guard withfixes this
I think it is necessary to be able to sanitize the FLINT source code, but I'll wait a day or so before merging this in case someone has any objections.