4.2.1.34 The short-enums test

  Problem:  Compiler options can change the size of enums
  Fix By:   Compile with consistent use of the -fshort-enum option
  Waive If: Enums are not passed between different compilation units

  Example:  FAIL: short-enum test because both short and long enums supported

The -fshort-enums gcc compiler option can be used to reduce code size by storing enums in a short instead of an int. But if the code passes enums between functions compiled in different files then the -fshort-enums option must be used consistently or there could be problems.

This test checks that either all files in an application were compiled with the -fshort-enums option, or that the option was never used.

If necessary the test can be disabled via the --skip-short-enums option and re-enabled via the --test-short-enums option.