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

Adds function declarations #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jrincayc
Copy link

Newer C compilers are getting stricter about requiring function prototypes (GCC for example makes it an error in version 14 [https://gcc.gnu.org/gcc-14/porting_to.html] )

This pull request adds all needed function prototypes for compiling.

Without these -Wno-implicit-function-declaration is needed.
@jrincayc
Copy link
Author

Note that -Wno-implicit-int is needed with GCC 14 to compile.

Also, an alternative to this is to compile with -Wno-implicit-function-declaration in GCC 14

@jrincayc
Copy link
Author

jrincayc commented Sep 15, 2024

If you would prefer K&R syntax, this can be changed to:

int AddList();
int GetList();
int GetObject();
void PrintList();
void PrintObject();
void PrintChar();
int Car();
int Cdr();
int Cons();
int Eval();

I would be happy to create the pull request that way instead if you would prefer.

(branch https://github.com/jrincayc/sectorlisp/tree/kandr )

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 this pull request may close these issues.

1 participant