Skip to content

C4146 in VS 2013 #10

Description

@zno5

uint32_t pcg32_random_r(pcg32_random_t* rng);

I got an error message C4146 when I compiled this function with vs 2013.
the problem is the minus op applied to unsigned type variable rot(in the return code).

Could you change that code like ~rot + 1 instead of -rot.

thanks.

and I think this following issue is minor...
I think xorshifted variable would need a casting op. like this
uint32_t xorshifted = (uint32_t) (((oldstate >> 18u) ^ oldstate) >> 27u);

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions