Skip to content

ULL constants are not C89 #745

@real-or-random

Description

@real-or-random

The README states as a goal: "Intended to be portable to any system with a C89 compiler and uint64_t support."

The C89 syntax does not specify unsigned long long (ULL) constants because there is no requirement that a unsigned long long type exists. We use ULL in a few places, e.g.:

#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)

We should replace ULL with the UINT64_C macro from in stdint.h. Note that UL is not an issue: It's in the C89 syntax and unsigned long is guaranteed to have at least 32 value bits, so we can use it for uint32_t constants. We may still want to change it for consistency and readability (clearer expression of intent).

Alternatively, we can do nothing (because noone seemed to care about this so far).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions