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
Return converter code generated by Argument Clinic has a warning for unsigned types #66318
Comments
The issue bpo-22110 enabled more compiler warnings. Attached patch tries to fix most of them on Linux. |
clinic.patch: modify clinic.py to generate "return_value == (type)-1" instead of "return_value == -1" to avoid a warning if return_value is unsigned. |
I think this should be done only for unsigned integer types. Otherwise it just dirty sources and can hide actual bugs. |
It would be better to only modify clinic for unsigned types, but how do you |
Either override render() for unsigned type converters, or add new converter |
Hum, I forgot the attach the most important patch: fix_warnings.patch. |
The title for this bug was almost offensively generic; it was hard to find in my email. If this new one is inaccurate, fix it--but please pick something more specific. Attached is a patch for the "_return_value == -1" behavior for unsigned. |
larry.fix.unsigned.int.return.-1.converter.cast.1.txt LGTM. Victor, looks as you should open new issue for fix_warnings.patch. This is large patch and requires long time for careful review and may be discussion. |
New changeset 9c949e0115e2 by Larry Hastings in branch 'default': |
Fixed and closed. I'm assuming Victor will break the other patch out into its own issue. Since IIUC there's no code in 3.4 that uses an unsigned integer return converter, I'm not backporting the fix. |
Since my argument clinic patch hijacked this issue, I created a new one for fix_warnings.patch: issue bpo-22156. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: