Skip to content

Add C89 assertion SIZE_MAX > ULONG_MAX #9

@randoragon

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions