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

Evangelos Foutras <evangelos at foutrelis dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |---

--- Comment #4 from Evangelos Foutras <evangelos at foutrelis dot com> ---
I'm afraid it's not fully fixed yet; using -Wno-error=narrowing will still
initialize all array elements to zero:

$ echo 'int foo[] = { 1, 0xFFFFFFFF, 3 };' | g++ -S -x c++ - -o - -std=c++11
-Wno-error=narrowing 
        .file   ""
<stdin>:1:32: warning: narrowing conversion of ‘4294967295u’ from ‘unsigned
int’ to ‘int’ inside { } [-Wnarrowing]
        .globl  foo
        .bss
        .align 8
        .type   foo, @object
        .size   foo, 12
foo:
        .zero   12
        .ident  "GCC: (GNU) 5.1.1 20150504"
        .section        .note.GNU-stack,"",@progbits

Reply via email to