[riot-notifications] [RIOT-OS/RIOT] "sorry, unimplemented: non-trivial designated initializers not supported" (#12179)

マリウス notifications at github.com
Sat Sep 7 13:06:52 CEST 2019


Including a C `USEMODULE` into a C++ (`FEATURES_REQUIRED += cpp`) project which contains of a header file that uses this kind of array initialisers doesn't compile:

```c
#ifdef __cplusplus
extern "C" {
#endif

// ...

enum ENUM_VALUES {
  ENUM_VAL_1,
  ENUM_VAL_2,
};
typedef enum ENUM_VALUES ENUM_VALUES;

static const uint8_t BLA[256][8] = {
  [ENUM_VAL_1] = { 0, 0, 0, 0, 0, 0, 0, 0 },
  [ENUM_VAL_2] = { 0, 0, 0, 0, 0, 0, 0, 0 },
  // ...
};

// ...

#ifdef __cplusplus
}
#endif
```

`make` output is: `sorry, unimplemented: non-trivial designated initializers not supported`.

However, a `test.cpp` program which includes the specific header and accesses its values can be compiled and run without any issues using `g++ ./test.cpp -o ./test`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/12179
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190907/0ee01bb6/attachment.htm>


More information about the notifications mailing list