diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-08-08 17:56:06 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-09-02 17:34:00 +0200 |
| commit | b8c706f3d0116b79f3935f36162fae610311c163 (patch) | |
| tree | 8aefbf720af76b0c574883ca1df0b230c700c767 /validation/expand | |
| parent | 3c748099b5a79d74461c142248920316504c5cb0 (diff) | |
| download | sparse-dev-b8c706f3d0116b79f3935f36162fae610311c163.tar.gz | |
constexpr: relax constexprness of constant conditionals
Currently, sparse emits a warning when a conditional expression with a
constant condition is used where an "Integer Constant Expression" is
expected and only the false-side operand (which is not evaluated) is
not constant. The standard are especially unclear about this situation.
However, GCC silently accept those as ICEs when they evaluate to a compile-time
known value (in other words, when the conditional and the corresponding
true/false sub-expression are themselves constant). The standard are
especially unclear about the situation when the unevaluated side is non-constant.
So, relax sparse to match GCC's behaviour.
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/expand')
0 files changed, 0 insertions, 0 deletions
