Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在vs2010 debug模式下报错 #4

Closed
tp-nan opened this issue Sep 20, 2017 · 0 comments
Closed

在vs2010 debug模式下报错 #4

tp-nan opened this issue Sep 20, 2017 · 0 comments

Comments

@tp-nan
Copy link

tp-nan commented Sep 20, 2017

a=a>>(BigInt::basebitnum);

1右移32位在vs2010 debug模式下还是1. 32位整型右移32位是未定义行为,会引起bug
C99中,对右移有这样的规定:

If the value of the right operand is negative or is

greater than or equal to the width of the promoted left operand, the behavior is undefined.

@tp-nan tp-nan closed this as completed Jul 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

No branches or pull requests

1 participant