Menu ▾ ▴

#2791 Wide character array initialization from wide string literal

closed-fixed
None
other
5
2018-07-30
2018-07-30
No

SDCC fails to initialize wide charcater arrays from wide string literals:

#include <wchar.h>

const wchar_t ws[] = L"test";

Results in an error: test.c:3: error 69: struct/union/array 'ws': initialization needs curly braces

I first noticed this in some of the reently added GCC 8.2 tests (tests/gcc-torture-execute-widechar-2.c and tests/gcc-torture-execute-wchar_t-1.c).

Philipp

Related

Bugs: #4189

Discussion

  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    In one place, wide string literals of wchar_t / char32_t were handled as if they were char16_t wide string literals. Fixed in [r10489].

    Philipp

     

Log in to post a comment.