[pypy-issue] Issue #3135: Compiler warnings when translating (pypy/pypy)
mattip
issues-reply at bitbucket.org
Tue Dec 24 03:33:20 EST 2019
New issue 3135: Compiler warnings when translating
https://bitbucket.org/pypy/pypy/issues/3135/compiler-warnings-when-translating
mattip:
There are many warnings when translating.
This one \(one example of tens of such warnings\)
```
[platform:WARNING] rpython_rlib_4.c: In function ‘pypy_g_TimSort_merge_collapse_13’:
[platform:WARNING] /<path>/pypy/rpython/translator/c/src/int.h:32:30: warning: assuming \
signed overflow does not occur when assuming that (X - c) <= X is always true \
[-Wstrict-overflow]
[platform:WARNING] #define OP_INT_LT(x,y,r) r = ((x) < (y))
[platform:WARNING] rpython_rlib_4.c:9390:4: note: in expansion of macro ‘OP_INT_LT’
[platform:WARNING] OP_INT_LT(l_index_11327, l_v2221820, l_v2221848);
```
is strange. All the values are `Signed` which is `long`. When I try to [replicate with godbolt](https://godbolt.org/z/u-cBQw), I do not get that warning
We also discard `const` qualifiers when accessing a struct field:
```
platform:WARNING] pypy_module_time.c: In function ‘pypy_g__init_timezone’:
[platform:WARNING] pypy_module_time.c:370:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
[platform:WARNING] l_cp_134 = RPyField(l_res_2143, tm_zone);
```
There are many more warnings, but these overshadow the other warnings.
More information about the pypy-issue
mailing list