2 Replies Latest reply on Aug 25, 2015 1:13 PM by Konradical

    non-trivial designated initializers not supported

    Konradical

      I've ran into an issue with the following code:

       

      /* Gyro driver state variables. */

      struct gyro_state_s {

          const struct gyro_reg_s *reg;

          const struct hw_s *hw;

          struct chip_cfg_s chip_cfg;

          const struct test_s *test;

      };

       

      static struct gyro_state_s st = {

          .reg = &reg,

          .hw = &hw,

          .test = &test

      };

      ^

      And received the following error:

       

      sorry, unimplemented: non-trivial designated initializers not supported

      };

      ^

       

      Any idea on how to get past this or why it's showing up? The error only appears on the last 1 of 4 structures initialized this way.