commit | a3dd7661d18aeb47bbad271f40cc23efb5dea8b5 | [log] [tgz] |
---|---|---|
author | Vernon Mauery <vernon.mauery@linux.intel.com> | Thu May 30 15:20:52 2019 -0700 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Thu May 30 16:54:57 2019 -0700 |
tree | 51f4781ba46fc94651c7eb4488b25ac64dc61bf6 | |
parent | 33298af179718bf6da82634101578eff39b4a9ae [diff] |
unpack static assert on unsupported types Unsupported types might not cause compile time errors but can result in SIGILL errors at runtime when compiler warnings are ignored. This was found when compiling an intel-ipmi-oem handler that attempted to unpack an enum class type. The code compiles down to an empty function (no return statement or value), which can result in all sorts of undefined behavior. This change forces the unsupported types to emit a static assert and fail to compile. Tested: Created a handler that requests an enum class as an input and saw that the build fails with a static assert. Change-Id: I123da15cb001756f07761cf7a60b799469926a2a Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.