On Fri, Apr 05, 2019 at 10:45:59AM -0600, Martin Sebor wrote:
> The change committed yesterday to handle the C++ 2a string literals
> as non-type template arguments treats empty string initializers for
> trailing pointer array elements as zero.  That's of course wrong
> because addresses of literals are non-zero.

That patch (r270155) also broke constexpr-63241.C:

constexpr-63241.C: In function ‘int main()’:
constexpr-63241.C:12:16: error: could not convert ‘<brace-enclosed initializer 
list>()’ from ‘<brace-enclosed initializer list>’ to ‘A’
   12 |      {{0}, {0}}};
      |                ^
      |                |
      |                <brace-enclosed initializer list>

We have an initializer for a multidimensional array of A, and somehow the
truncating of the elements breaks it.

Marek

Reply via email to