Skip to content

Conversation

@chris-eibl
Copy link
Member

@chris-eiblchris-eibl commented Mar 15, 2025

This line

PyTime_tns=large.QuadPart*100-11644473600000000000;

produces

..\Python\pytime.c(918,42): warning : integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal] 

Let's convert it to

PyTime_tns= (large.QuadPart-116444736000000000) *100;

which produces no warning but the exact same code: https://godbolt.org/z/r97Yadj5s

I think this is a skip news.

to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
@gpsheadgpshead merged commit f104c19 into python:mainMar 15, 2025
49 checks passed
@chris-eiblchris-eibl deleted the fix_clangcl_pytime branch March 15, 2025 19:17
plashchynski pushed a commit to plashchynski/cpython that referenced this pull request Mar 17, 2025
…H-131297) fix warning : integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@chris-eibl@gpshead