Skip to content

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 )

@jrincayc
Copy link
Author

Or you could completely eliminate implicit ints: https://github.com/jrincayc/sectorlisp/tree/no_implicit_int

@jart
Copy link
Owner

jart commented Nov 27, 2024

I've merged #33 in favor of this change, for reasons which I'll explain in greater detail in #34.

@jart jart closed this Nov 27, 2024
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.

2 participants