Skip to content

Conversation

fweimer-rh
Copy link

It is required for declarations of the malloc and free functions, otherwise future compilers will not be able to build the generated code because they do not support implicit function declarations by default.

This also addresses potential crashes on 64-bit architectures if the 64-bit pointer returned by malloc is truncated to 32 bits because of the int return type of the implicit malloc declaration.

Related to:

It is required for declarations of the malloc and free functions,
otherwise future compilers will not be able to build the generated
code because they do not support implicit function declarations by
default.

This also addresses potential crashes on 64-bit architectures if
the 64-bit pointer returned by malloc is truncated to 32 bits
because of the int return type of the implicit malloc declaration.
@fweimer-rh fweimer-rh changed the title heapify: Include <stdlib.h> un generated C code heapify: Include <stdlib.h> in generated C code Apr 24, 2023
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