[issue43412] object.h -Wcast-qual warning

2021-06-30 Thread STINNER Victor

STINNER Victor  added the comment:

> Duplicated by https://bugs.python.org/issue44378, which has a fix merged.

Right. I close the issue as a duplicate.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer 
target type

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43412] object.h -Wcast-qual warning

2021-06-30 Thread Leif Walsh


Leif Walsh  added the comment:

Duplicated by https://bugs.python.org/issue44378, which has a fix merged.

--
nosy: +leif.walsh

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43412] object.h -Wcast-qual warning

2021-03-13 Thread STINNER Victor


STINNER Victor  added the comment:

> object.h contains an inline function that causes a -Wcast-qual warning from 
> gcc.

Which function? Can you please provide the warning?

Do you want to propose a fix?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43412] object.h -Wcast-qual warning

2021-03-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Victor, the apparent 3.10 regression is from your commit.

--
nosy: +terry.reedy, vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43412] object.h -Wcast-qual warning

2021-03-05 Thread Peter Eisentraut


New submission from Peter Eisentraut :

object.h contains an inline function that causes a -Wcast-qual warning from 
gcc.  Since this file ends up visible in third-party code that includes 
Python.h, this makes it impossible to use -Wcast-qual in such code.

The problem is the change c5cb077ab3c88394b7ac8ed4e746bd31b53e39f1, which 
replaced ob->ob_type by Py_TYPE(ob), which seems reasonable by itself, but 
Py_TYPE casts away the const, so it creates this problem.

This is a regression in Python 3.10.

--
components: Interpreter Core
messages: 388167
nosy: petere
priority: normal
severity: normal
status: open
title: object.h -Wcast-qual warning
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com