Skip to content
Commit f61cd12b authored by Sebastian Bøe's avatar Sebastian Bøe Committed by Anas Nashif
Browse files

bluetooth: Fix "struct bt_gatt_read_params" declaration



Compiling this declaration with a CXX compiler triggers the compiler
error:

/home/sebo/zephyr/include/bluetooth/gatt.h:898:10: error: ‘struct
bt_gatt_read_params::<anonymous union>::__single’ invalid; an
anonymous union can only have non-static data members [-fpermissive]

Reading up on the standard, I was unable to find any mention of this
being valid C or CXX code (But reading the standard is not
straightforward). And I was unable to find any mechanism to make the
CXX compiler accept it (e.g. Changing the -std, or adding this as a
language extension e.g. -fms-extensions).

So we rewrite it to not declare the struct with the tag
"__single". There does not seem to be any reason for it to be declared
like this.

Signed-off-by: default avatarSebastian Bøe <sebastian.boe@nordicsemi.no>
parent 4b7f3e75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment