c++: mark short-enums as packed
Unlike C, C++ doesn't mark enums shortened by -fshort-enums as packed.
This makes for undesirable warning differences between C and C++,
e.g. c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early*.c
triggers a warning about a type cast from a pointer to enum that, when
packed, might not be sufficiently aligned.
This change is not enough for that warning to trigger. The tree
expression generated by the C++ front-end is also a little too
complicated for us get to the base pointer. A separate patch takes
care of that.
for gcc/cp/ChangeLog
* decl.cc (finish_enum_value_list): Set TYPE_PACKED if
use_short_enum, and propagate it to variants.