facil-io / cstl

facil.io C STL - a Server Toolbox Library for C, including JSON processing, hash maps, dynamic arrays, binary strings and more.
https://facil.io
MIT License
68 stars 6 forks source link

C++ sample test: get errors #23

Closed kassane closed 11 months ago

kassane commented 11 months ago

full-log: build.log

./fio-stl/902 url.h:230:35: note: previous initialization for field 'buf' is here
  230 |                   .host = {.buf = (char *)"example.com", .len = 11},
      |                                   ^~~~~~~~~~~~~~~~~~~~~
./fio-stl/902 url.h:231:51: warning: ISO C++ requires field designators to be specified in declaration order; field 'buf' will be initialized after field 'len' [-Wreorder-init-list]
  231 |                   .port = {.buf = (char *)"8080", .len = 4},
      |                                                   ^~~~~~~~
./fio-stl/902 url.h:231:35: note: previous initialization for field 'buf' is here
  231 |                   .port = {.buf = (char *)"8080", .len = 4},
      |                                   ^~~~~~~~~~~~~~
./fio-stl/902 url.h:232:58: warning: ISO C++ requires field designators to be specified in declaration order; field 'buf' will be initialized after field 'len' [-Wreorder-init-list]
  232 |                   .path = {.buf = (char *)"/index.html", .len = 11},
      |                                                          ^~~~~~~~~
./fio-stl/902 url.h:232:35: note: previous initialization for field 'buf' is here
  232 |                   .path = {.buf = (char *)"/index.html", .len = 11},
      |                                   ^~~~~~~~~~~~~~~~~~~~~
In file included from tests/cpp.cpp:1:
In file included from tests/./stl.c:11:
In file included from ./fio-stl/include.h:154:
In file included from ./fio-stl/700 cleanup.h:67:
In file included from ./fio-stl/include.h:154:
In file included from ./fio-stl/700 cleanup.h:67:
In file included from ./fio-stl/include.h:154:
In file included from ./fio-stl/700 cleanup.h:67:
In file included from ./fio-stl/include.h:154:
In file included from ./fio-stl/700 cleanup.h:67:
In file included from ./fio-stl/include.h:154:
In file included from ./fio-stl/700 cleanup.h:67:
In file included from ./fio-stl/include.h:183:
./fio-stl/903 chacha.h:229:20: error: initializer-string for char array is too long, array size is 16 but initializer has size 17 (including the null terminating character)
  229 |             .mac = "\x1a\xe1\x0b\x59\x4f\x09\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  230 |                    "\x06\x91",
      |                    ~~~~~~~~~~
./fio-stl/903 chacha.h:283:20: error: initializer-string for char array is too long, array size is 16 but initializer has size 17 (including the null terminating character)
  283 |             .mac = "\xee\xad\x9d\x67\x89\x0c\xbb\x22\x39\x23\x36\xfe\xa1\x85"
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  284 |                    "\x1f\x38",
      |                    ~~~~~~~~~~
254 warnings and 4 errors generated.
make: *** [makefile:751: tmp/tests/cpp.o] Error 1
boazsegev commented 11 months ago

This log file actually explains a little mystery ... I couldn't reproduce the issue on my machine, but it seems you're compiling the examples using C++ instead of C...

I should try compiling as C++ and make sure I haven't used any keywords that would cause an issue.

kassane commented 11 months ago

.. I couldn't reproduce the issue on my machine

$ CC=clang CXX=clang++ make tests/cpp

When pass this code in CMake, something similar also occurs, but with a much larger log file.

boazsegev commented 11 months ago

fixed.

kassane commented 11 months ago

@boazsegev,

On clang works, but GCC 13.2.1 20230801 not working.

build.log

and on Cmake:

In file included from /home/kassane/cstl/./fio-stl/include.h:63,
                 from /home/kassane/cstl/tests/./stl.c:11,
                 from /home/kassane/cstl/tests/cpp.cpp:1:
/home/kassane/cstl/./fio-stl/004 state callbacks.h: In function ‘void fio_state_callback_force(fio_state_event_type_e)’:
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
  232 |   };
      |   ^
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
/home/kassane/cstl/./fio-stl/004 state callbacks.h:232:3: sorry, unimplemented: non-trivial designated initializers not supported
In file included from /home/kassane/cstl/./fio-stl/include.h:113:
/home/kassane/cstl/./fio-stl/302 sha2.h: In function ‘fio_sha256_s fio_sha256_init()’:
/home/kassane/cstl/./fio-stl/302 sha2.h:65:21: error: expected primary-expression before ‘.’ token
   65 |   fio_sha256_s h = {.hash.u32 = {0x6A09E667ULL,
      |                     ^
/home/kassane/cstl/./fio-stl/302 sha2.h: In function ‘fio_sha512_s fio_sha512_init()’:
/home/kassane/cstl/./fio-stl/302 sha2.h:85:21: error: expected primary-expression before ‘.’ token
   85 |   fio_sha512_s h = {.hash.u64 = {0x6A09E667F3BCC908ULL,
      |                     ^
In file included from /home/kassane/cstl/./fio-stl/include.h:35:
/home/kassane/cstl/./fio-stl/302 sha2.h: In function ‘void fio___sha256_round(fio_u256*, const uint8_t*)’:
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 sha2.h:143:3: note: in expansion of macro ‘fio_u32x8_reshuffle’
  143 |   fio_u32x8_reshuffle(v, 7, 0, 1, 2, 3, 4, 5, 6);                              \
      |   ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 sha2.h:151:5: note: in expansion of macro ‘FIO___SHA256_ROUND_INNER_COMMON’
  151 |     FIO___SHA256_ROUND_INNER_COMMON();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 sha2.h:143:3: note: in expansion of macro ‘fio_u32x8_reshuffle’
  143 |   fio_u32x8_reshuffle(v, 7, 0, 1, 2, 3, 4, 5, 6);                              \
      |   ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 sha2.h:164:5: note: in expansion of macro ‘FIO___SHA256_ROUND_INNER_COMMON’
  164 |     FIO___SHA256_ROUND_INNER_COMMON();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h: In function ‘void fio___chacha_vround20(fio_u512, uint8_t*)’:
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:381:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  381 |     fio_u32x4_reshuffle((v + 4), 1, 2, 3, 0);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:382:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  382 |     fio_u32x4_reshuffle((v + 8), 2, 3, 0, 1);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:383:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  383 |     fio_u32x4_reshuffle((v + 12), 3, 0, 1, 2);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:385:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  385 |     fio_u32x4_reshuffle((v + 4), 3, 0, 1, 2);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:386:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  386 |     fio_u32x4_reshuffle((v + 8), 2, 3, 0, 1);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:306:78: error: taking address of temporary array
  306 | #define fio_u32x4_reshuffle(v, ...)    fio_u32x4_reshuffle(v,    (uint8_t[4]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:387:5: note: in expansion of macro ‘fio_u32x4_reshuffle’
  387 |     fio_u32x4_reshuffle((v + 12), 1, 2, 3, 0);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h: In function ‘void fio___chacha_vround20x2(fio_u512, uint8_t*)’:
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:417:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  417 |     fio_u32x8_reshuffle((v + 8), 1, 2, 3, 0, 5, 6, 7, 4);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:418:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  418 |     fio_u32x8_reshuffle((v + 16), 2, 3, 0, 1, 6, 7, 4, 5);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:419:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  419 |     fio_u32x8_reshuffle((v + 24), 3, 0, 1, 2, 7, 4, 5, 6);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:421:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  421 |     fio_u32x8_reshuffle((v + 8), 3, 0, 1, 2, 7, 4, 5, 6);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:422:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  422 |     fio_u32x8_reshuffle((v + 16), 2, 3, 0, 1, 6, 7, 4, 5);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:423:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  423 |     fio_u32x8_reshuffle((v + 24), 1, 2, 3, 0, 5, 6, 7, 4);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:437:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  437 |     fio_u32x8_reshuffle((v + 4), 4, 5, 6, 7, 0, 1, 2, 3);
      |     ^~~~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/002 math.h:307:78: error: taking address of temporary array
  307 | #define fio_u32x8_reshuffle(v, ...)    fio_u32x8_reshuffle(v,    (uint8_t[8]){__VA_ARGS__})
      |                                                                              ^~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/302 chacha20poly1305.h:438:5: note: in expansion of macro ‘fio_u32x8_reshuffle’
  438 |     fio_u32x8_reshuffle((v + 20), 4, 5, 6, 7, 0, 1, 2, 3);
      |     ^~~~~~~~~~~~~~~~~~~
In file included from /home/kassane/cstl/./fio-stl/include.h:84,
                 from /home/kassane/cstl/./fio-stl/700 cleanup.h:67,
                 from /home/kassane/cstl/./fio-stl/include.h:154:
/home/kassane/cstl/./fio-stl/104 mustache.h: In function ‘fio_buf_info_s fio___mustache_load_template(fio___mustache_parser_s*, fio_buf_info_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/104 mustache.h:608:11: note: in expansion of macro ‘fio_string_write2’
  608 |           fio_string_write2(
      |           ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/104 mustache.h:608:11: note: in expansion of macro ‘fio_string_write2’
  608 |           fio_string_write2(
      |           ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/104 mustache.h:629:5: note: in expansion of macro ‘fio_string_write2’
  629 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/104 mustache.h:629:5: note: in expansion of macro ‘fio_string_write2’
  629 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/104 mustache.h: In function ‘int fio___mustache_parse_add_text(fio___mustache_parser_s*, fio_buf_info_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/104 mustache.h:683:13: note: in expansion of macro ‘fio_bstr_write2’
  683 |   p->root = fio_bstr_write2(p->root,
      |             ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/104 mustache.h:683:13: note: in expansion of macro ‘fio_bstr_write2’
  683 |   p->root = fio_bstr_write2(p->root,
      |             ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/104 mustache.h: In function ‘int fio___mustache_parse_section_start(fio___mustache_parser_s*, fio_buf_info_s, size_t)’:
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/104 mustache.h:777:22: note: in expansion of macro ‘fio_bstr_write2’
  777 |   new_section.root = fio_bstr_write2(new_section.root,
      |                      ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/104 mustache.h:777:22: note: in expansion of macro ‘fio_bstr_write2’
  777 |   new_section.root = fio_bstr_write2(new_section.root,
      |                      ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/104 mustache.h: In function ‘int fio___mustache_parse_partial(fio___mustache_parser_s*, fio_buf_info_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/104 mustache.h:819:15: note: in expansion of macro ‘fio_bstr_write2’
  819 |     p->root = fio_bstr_write2(
      |               ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/104 mustache.h:819:15: note: in expansion of macro ‘fio_bstr_write2’
  819 |     p->root = fio_bstr_write2(
      |               ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/104 mustache.h: In function ‘int fio___mustache_parse_var_name(fio___mustache_parser_s*, fio_buf_info_s, size_t)’:
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/104 mustache.h:910:13: note: in expansion of macro ‘fio_bstr_write2’
  910 |   p->root = fio_bstr_write2(p->root,
      |             ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/104 mustache.h:910:13: note: in expansion of macro ‘fio_bstr_write2’
  910 |   p->root = fio_bstr_write2(p->root,
      |             ^~~~~~~~~~~~~~~
In file included from /home/kassane/cstl/./fio-stl/include.h:79,
                 from /home/kassane/cstl/./fio-stl/700 cleanup.h:67,
                 from /home/kassane/cstl/./fio-stl/include.h:154,
                 from /home/kassane/cstl/./fio-stl/700 cleanup.h:67,
                 from /home/kassane/cstl/./fio-stl/include.h:154:
/home/kassane/cstl/./fio-stl/102 poll epoll.h: In function ‘int fio___epoll_add2(int, void*, uint32_t, int)’:
/home/kassane/cstl/./fio-stl/102 poll epoll.h:82:16: error: expected primary-expression before ‘struct’
   82 |     chevent = (struct epoll_event){
      |                ^~~~~~
/home/kassane/cstl/./fio-stl/102 poll epoll.h:82:16: error: expected ‘)’ before ‘struct’
   82 |     chevent = (struct epoll_event){
      |               ~^~~~~~
      |                )
/home/kassane/cstl/./fio-stl/102 poll epoll.h:89:18: error: expected primary-expression before ‘struct’
   89 |       chevent = (struct epoll_event){
      |                  ^~~~~~
/home/kassane/cstl/./fio-stl/102 poll epoll.h:89:18: error: expected ‘)’ before ‘struct’
   89 |       chevent = (struct epoll_event){
      |                 ~^~~~~~
      |                  )
/home/kassane/cstl/./fio-stl/400 server.h: In function ‘void* fio_srv_listen(fio_srv_listen_args)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/400 server.h:2418:5: note: in expansion of macro ‘fio_string_write2’
 2418 |     fio_string_write2(&url_alt,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/400 server.h:2418:5: note: in expansion of macro ‘fio_string_write2’
 2418 |     fio_string_write2(&url_alt,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/420 pubsub.h: In function ‘int fio_pubsub_ipc_url_set(char*, size_t)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/420 pubsub.h:834:3: note: in expansion of macro ‘fio_string_write2’
  834 |   fio_string_write2(&url, NULL, FIO_STRING_WRITE_STR2(str, len));
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/420 pubsub.h:834:3: note: in expansion of macro ‘fio_string_write2’
  834 |   fio_string_write2(&url, NULL, FIO_STRING_WRITE_STR2(str, len));
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/420 pubsub.h: In function ‘void fio_postoffice_init()’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/420 pubsub.h:1030:3: note: in expansion of macro ‘fio_string_write2’
 1030 |   fio_string_write2(&url,
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/420 pubsub.h:1030:3: note: in expansion of macro ‘fio_string_write2’
 1030 |   fio_string_write2(&url,
      |   ^~~~~~~~~~~~~~~~~
In file included from /home/kassane/cstl/./fio-stl/include.h:131:
/home/kassane/cstl/./fio-stl/420 pubsub.h: In function ‘void fio___pubsub_protocol_on_timeout(fio_s*)’:
/home/kassane/cstl/./fio-stl/420 pubsub.h:1807:31: sorry, unimplemented: non-trivial designated initializers not supported
 1807 |       [23] = FIO___PUBSUB_PING};
      |                               ^
/home/kassane/cstl/./fio-stl/420 pubsub.h: In function ‘void fio___pubsub_broadcast_hello(fio_s*)’:
/home/kassane/cstl/./fio-stl/420 pubsub.h:1969:30: error: expected primary-expression before ‘struct’
 1969 |   struct sockaddr_in addr = (struct sockaddr_in){
      |                              ^~~~~~
/home/kassane/cstl/./fio-stl/420 pubsub.h:1969:30: error: expected ‘)’ before ‘struct’
 1969 |   struct sockaddr_in addr = (struct sockaddr_in){
      |                             ~^~~~~~
      |                              )
[ 75%] Linking C executable base64
In file included from /home/kassane/cstl/./fio-stl/include.h:142:
/home/kassane/cstl/./fio-stl/431 http handle.h: In function ‘fio_http_s* fio_http_destroy(fio_http_s*)’:
/home/kassane/cstl/./fio-stl/431 http handle.h:1262:18: error: expected primary-expression before ‘)’ token
 1262 |   h = (fio_http_s) {                                                           \
      |                  ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1283:3: note: in expansion of macro ‘FIO_REF_INIT’
 1283 |   FIO_REF_INIT(*h);
      |   ^~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/299 reference counter.h: In function ‘fio_http_s* fio_http_new2()’:
/home/kassane/cstl/./fio-stl/431 http handle.h:1262:18: error: expected primary-expression before ‘)’ token
 1262 |   h = (fio_http_s) {                                                           \
      |                  ^
/home/kassane/cstl/./fio-stl/299 reference counter.h:163:3: note: in expansion of macro ‘FIO_REF_INIT’
  163 |   FIO_REF_INIT((ret[0]));
      |   ^~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/431 http handle.h: In function ‘int fio_http_cookie_set(fio_http_s*, fio_http_cookie_args_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1653:5: note: in expansion of macro ‘fio_string_write2’
 1653 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1653:5: note: in expansion of macro ‘fio_string_write2’
 1653 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1662:5: note: in expansion of macro ‘fio_string_write2’
 1662 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1662:5: note: in expansion of macro ‘fio_string_write2’
 1662 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1670:5: note: in expansion of macro ‘fio_string_write2’
 1670 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:1670:5: note: in expansion of macro ‘fio_string_write2’
 1670 |     fio_string_write2(
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/431 http handle.h: In function ‘void fio_http_send_error_response(fio_http_s*, size_t)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2344:3: note: in expansion of macro ‘fio_string_write2’
 2344 |   fio_string_write2(&filename,
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2344:3: note: in expansion of macro ‘fio_string_write2’
 2344 |   fio_string_write2(&filename,
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2360:5: note: in expansion of macro ‘fio_string_write2’
 2360 |     fio_string_write2(&filename,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2360:5: note: in expansion of macro ‘fio_string_write2’
 2360 |     fio_string_write2(&filename,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/431 http handle.h: In function ‘void fio_http_write_log(fio_http_s*, fio_buf_info_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2425:3: note: in expansion of macro ‘fio_string_write2’
 2425 |   fio_string_write2(
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2425:3: note: in expansion of macro ‘fio_string_write2’
 2425 |   fio_string_write2(
      |   ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/431 http handle.h: In function ‘int fio_http_static_file_response(fio_http_s*, fio_str_info_s, fio_str_info_s, size_t)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2655:7: note: in expansion of macro ‘fio_string_write2’
 2655 |       fio_string_write2(&filename,
      |       ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2655:7: note: in expansion of macro ‘fio_string_write2’
 2655 |       fio_string_write2(&filename,
      |       ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2709:5: note: in expansion of macro ‘fio_string_write2’
 2709 |     fio_string_write2(&filename,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/431 http handle.h:2709:5: note: in expansion of macro ‘fio_string_write2’
 2709 |     fio_string_write2(&filename,
      |     ^~~~~~~~~~~~~~~~~
[ 75%] Built target base64
In file included from /home/kassane/cstl/./fio-stl/include.h:146:
/home/kassane/cstl/./fio-stl/439 http.h: In function ‘fio_s* fio_http_connect(const char*, fio_http_s*, fio_http_settings_s)’:
/home/kassane/cstl/./fio-stl/439 http.h:824:32: error: expected primary-expression before ‘)’ token
  824 |   *c = (fio___http_connection_s){
      |                                ^
/home/kassane/cstl/./fio-stl/439 http.h: In function ‘void fio___http_on_attach_accept(fio_s*)’:
/home/kassane/cstl/./fio-stl/439 http.h:1023:32: error: expected primary-expression before ‘)’ token
 1023 |   *c = (fio___http_connection_s){
      |                                ^
/home/kassane/cstl/./fio-stl/439 http.h: In function ‘int fio_http1___write_header_callback(fio_http_s*, fio_str_info_s, fio_str_info_s, void*)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/439 http.h:1167:10: note: in expansion of macro ‘fio_string_write2’
 1167 |   return fio_string_write2(out,
      |          ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/439 http.h:1167:10: note: in expansion of macro ‘fio_string_write2’
 1167 |   return fio_string_write2(out,
      |          ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/439 http.h: In function ‘void fio___http_controller_http1_send_headers(fio_http_s*)’:
/home/kassane/cstl/./fio-stl/102 string core.h:149:40: error: expected primary-expression before ‘[’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                        ^
/home/kassane/cstl/./fio-stl/439 http.h:1188:5: note: in expansion of macro ‘fio_string_write2’
 1188 |     fio_string_write2(&buf,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:149:41: error: expected primary-expression before ‘]’ token
  149 |                     (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                         ^
/home/kassane/cstl/./fio-stl/439 http.h:1188:5: note: in expansion of macro ‘fio_string_write2’
 1188 |     fio_string_write2(&buf,
      |     ^~~~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/439 http.h: In function ‘int fio_http_sse_write(fio_http_s*, fio_http_sse_write_args_s)’:
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/439 http.h:1649:15: note: in expansion of macro ‘fio_bstr_write2’
 1649 |     payload = fio_bstr_write2(payload,
      |               ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/439 http.h:1649:15: note: in expansion of macro ‘fio_bstr_write2’
 1649 |     payload = fio_bstr_write2(payload,
      |               ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/439 http.h:1655:9: note: in expansion of macro ‘fio_bstr_write2’
 1655 |         fio_bstr_write2(payload,
      |         ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/439 http.h:1655:9: note: in expansion of macro ‘fio_bstr_write2’
 1655 |         fio_bstr_write2(payload,
      |         ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/439 http.h:1668:11: note: in expansion of macro ‘fio_bstr_write2’
 1668 |           fio_bstr_write2(payload,
      |           ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/439 http.h:1668:11: note: in expansion of macro ‘fio_bstr_write2’
 1668 |           fio_bstr_write2(payload,
      |           ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:44: error: expected primary-expression before ‘[’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                            ^
/home/kassane/cstl/./fio-stl/439 http.h:1677:9: note: in expansion of macro ‘fio_bstr_write2’
 1677 |         fio_bstr_write2(payload,
      |         ^~~~~~~~~~~~~~~
/home/kassane/cstl/./fio-stl/102 string core.h:512:45: error: expected primary-expression before ‘]’ token
  512 |   fio_bstr_write2(bstr, (fio_string_write_s[]){__VA_ARGS__, {0}})
      |                                             ^
/home/kassane/cstl/./fio-stl/439 http.h:1677:9: note: in expansion of macro ‘fio_bstr_write2’
 1677 |         fio_bstr_write2(payload,
      |         ^~~~~~~~~~~~~~~