Skip to content

Add C89 assertion SIZE_MAX > ULONG_MAX #9

Description

@randoragon

The C89 code relies on printing size_t as unsigned long, because a dedicated printf format specifier string wasn't introduced yet. This works with the assumption that size_t fits in an unsigned long, which is probably always true in C89. A compile-time assertion wouldn't hurt though.

Relevant discussion: https://stackoverflow.com/questions/47556181/is-it-safe-to-cast-size-t-to-unsigned-long-int

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions