https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91292
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> --- > According to http://itanium-cxx-abi.github.io/cxx-abi/abi.html#expressions , > a negative number isn't treated as a negative literal; it is a negated > number. This means that it is mangled as though it were positive, and then > its negation is mangled. So -1 and -(1) are treated the same. Hmm, but according to http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling.literal the mangling of a negative integer literal is prefixed with "n", and according to http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.operator-name the mangling of -<expr> is prefixed with "ng". So I don't see why -1 and -(1) should be given the same mangling. ISTM GCC is already getting the mangling right.