summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-15 16:54:52 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-08-15 16:59:09 +0200
commit7242d7420b04132f93f1426ec713f9b09bdeba54 (patch)
tree79937cb4843d701f1f7c6fdb6b954a9c9a720925 /src/resolve
parentfdcba430aeae442ab0ea12a08d96cfc3d13f57ef (diff)
macro: add CONST_MAX() macro
The CONST_MAX() macro is similar to MAX(), but verifies that both arguments have the same type and are constant expressions. Furthermore, the result of CONST_MAX() is again a constant-expression. CONST_MAX() avoids any statement-expressions and other non-trivial expression-types. This avoids rather arbitrary restrictions in both GCC and LLVM, which both either fail with statement-expressions inside type-declarations or statement-expressions inside static-const initializations. If anybody knows how to circumvent this, please feel free to unify CONST_MAX() and MAX().
Diffstat (limited to 'src/resolve')
0 files changed, 0 insertions, 0 deletions