|
From: | Paul Eggert |
Subject: | Re: Preview: portable dumper |
Date: | Fri, 16 Feb 2018 13:09:31 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/16/2018 12:43 PM, Daniel Colascione wrote:
IMHO, we should enable -Wconversion more broadly.
My experience is just the opposite: i.e., that -Wconversion causes more trouble than it cures. The pdumper change to INTEGER_TO_CONS is an example of trouble. The only reason for that change is to work around a compiler bug in GCC that is caused by -Wconversion, a bug that leads to a false alarm. I suggest at least the attached patch, which limits the damage to pdumper.c instead of letting it spread to other Emacs modules. But better yet, I suggest dropping the idea of using -Wconversion even on pdumper.c, as it's counterproductive and in high-quality code almost inevitably leads to further obfuscation like ALLOW_IMPLICIT_CONVERSION and DISALLOW_IMPLICIT_CONVERSION.
PS. Double-parens like that shouldn't be needed in macro bodies, as each macro must parenthesize its argument properly anyway.
0001-Better-workaround-for-GCC-bug-with-Wconversion.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |