https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77572

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> I still get the same output as Martin using recent trunk, and any older
> versions.

Ah, I see what happens, I get the same nonsensical output as Martin when I
compile for 64-bit, but when I compile for 32-bit, I get the normal-looking
output I got before:

$ g++ -m64 -c -S -Wall 77572.cc
77572.cc:1:19: error: invalid conversion from 'const char*' to 'int'
[-fpermissive]
 constexpr int i = "\x0_\x01_\x7f_\x80_\xff";
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
77572.cc:1:19: error: '(int)((const
char*)"\000_\001_\177_\37777777600_\37777777777")' is not a constant expression
$ g++ -m32 -c -S -Wall 77572.cc
77572.cc:1:19: error: invalid conversion from 'const char*' to 'int'
[-fpermissive]
 constexpr int i = "\x0_\x01_\x7f_\x80_\xff";
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
77572.cc:1:19: error: conversion from pointer type 'const char (*)[10]' to
arithmetic type 'int' in a constant expression
$

Reply via email to