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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Note C++ warns about it:

$ g++ pr107395.c -c
pr107395.c: In function ‘size_t f()’:
pr107395.c:4:29: error: initializer-string for ‘char [1]’ is too long
[-fpermissive]
    4 |                 char s[1] = "h";
      |                             ^~~
pr107395.c: In function ‘size_t f3()’:
pr107395.c:14:29: error: initializer-string for ‘char [2]’ is too long
[-fpermissive]
   14 |                 char s[2] = "hi";
      |                             ^~~~

Reply via email to