Uninitialized bits field reserved in CellProperties
struct CellProperties {
CellProperties(bool cell,
bool soft,
bool combinational,
bool constant,
bool identity,
bool commutative,
bool associative,
bool regroupable,
bool negative):
cell(cell),
soft(soft),
combinational(combinational),
constant(constant),
identity(identity),
commutative(commutative),
associative(associative),
regroupable(regroupable),
negative(negative) {}
/// Cell/soft flags identify the cell kind:
/// 00: Hard (block w/ unknown structure);
/// 01: Soft (block w/ known structure);
/// 10: Cell (technology-dependent cell);
/// 11: Gate (elementary logic function).
unsigned cell : 1;
unsigned soft : 1;
/// Describes the function properties.
unsigned combinational : 1;
unsigned constant : 1;
unsigned identity : 1;
unsigned commutative : 1;
unsigned associative : 1;
unsigned regroupable : 1;
unsigned negative : 1;
unsigned reserved : 7; // :::: **These field**
};
When the CellProperty constructor is called in a function, the gcc compiler prints a warning about the uninitialized field (reserved).
Suggested solution:
struct CellProperties {
CellProperties(bool cell,
bool soft,
bool combinational,
bool constant,
bool identity,
bool commutative,
bool associative,
bool regroupable,
bool negative):
cell(cell),
soft(soft),
combinational(combinational),
constant(constant),
identity(identity),
commutative(commutative),
associative(associative),
regroupable(regroupable),
negative(negative),
reserved(0) {}
/// Cell/soft flags identify the cell kind:
/// 00: Hard (block w/ unknown structure);
/// 01: Soft (block w/ known structure);
/// 10: Cell (technology-dependent cell);
/// 11: Gate (elementary logic function).
unsigned cell : 1;
unsigned soft : 1;
/// Describes the function properties.
unsigned combinational : 1;
unsigned constant : 1;
unsigned identity : 1;
unsigned commutative : 1;
unsigned associative : 1;
unsigned regroupable : 1;
unsigned negative : 1;
unsigned reserved : 7;
};