Skip to content
Commit c1852b83 authored by Marc Herbert's avatar Marc Herbert Committed by Anas Nashif
Browse files

pm: device.h: fix pm_device designated initializers order for C++



Fixes the following error appearing in the test coverage added by the
next commit:

In file included from zephyr/tests/lib/cpp/cxx/src/main.cpp:18:
```
zephyr/include/zephyr/pm/device.h:275:9: error: designator order for
  field 'pm_device_base::state' does not match declaration order
                        in 'pm_device_base'
  275 |         }
      |         ^
zephyr/include/zephyr/pm/device.h:315:17: note: in expansion of
                                                macro 'Z_PM_DEVICE_INIT'
  315 |              Z_PM_DEVICE_INIT(Z_PM_DEVICE_NAME(dev_id), node_id,
```

Note this failure is observed with any g++ -std=c++NN standard value -
even before C++20.

Signed-off-by: default avatarMarc Herbert <marc.herbert@intel.com>
parent c25b9b24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment