~cdemu/cdemu/master

Viewing all changes in revision 1794.

  • Committer: Henrik Stokseth
  • Date: 2020-02-11 17:33:14 UTC
  • Revision ID: git-v1:1f90f74db981e5e361478dfc43b97a6e59f6a8fe
libmirage: Getting rid of instances of conditional compilation.

Legacy C code often contains #ifdef blocks which effectively hides C code from
the compiler and prevents it from being checked by the compiler. Instead we can
replace these with simple if statements and rely on the compiler's
dead code elimination (DCE) pass to remove this from the result. For this
to work properly one ought to make sure the expression in the if statement
can be reliably determined at compile time, which means it should reduce down
to a simple constant value.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: