Currently, ASM operand aren't expanded or even evaluated. This causes Sparse to emit warning about 'unknown expression' during the linearization of these operands if they contains, for example, calls to __builtin_compatible_types_p(). This series contains a number of preparatory patches before adding the missing evaluation & expansion. Note: the correct handling of ASM operands needs to make the distinction between 'memory' operands and 'normal' operands. For this, it is needed to look at the consraints and these are architecture specific. The patches in this series only consider the constraints m, v, o & Q as being for memory operands and, happily, these seems to cover most usage for the most common architectures. This series is also available at: git://git.kernel.org/pub/scm/devel/sparse/sparse.git fix-expand-asm Luc Van Oostenryck (18): more consistent type info in error messages shorter message for non-scalar in conditionals expand: add test for expansion of compound literals expand: add missing expansion of compound literals dissect: fix processing of ASM statements string: add helper string_expression() string: use string_expression() in parse_static_assert() asm: add test evaluation, expansion & linearization of ASM operands asm: check earlier that body & constraints are strings asm: use a specific struct for asm operands asm: keep using struct asm_operand during linearization asm: parse constraints asm: use parse_asm_constraint() to verify constraints asm: missing evaluation of asm statements asm: linearization of output memory operands is different asm: fix liveness memory operand asm: fix missing expansion of asm statements asm: arrays & functions in non-memory operand degenerate into pointers allocate.c | 1 + allocate.h | 1 + dissect.c | 8 +- evaluate.c | 158 ++++++++++++++++++------- expand.c | 29 ++++- expression.c | 11 ++ expression.h | 20 ++-- inline.c | 28 ++--- lib.h | 2 + linearize.c | 48 ++++---- linearize.h | 1 + liveness.c | 5 +- parse.c | 22 ++-- parse.h | 4 +- show-parse.c | 3 - validation/asm-bad0.c | 41 +++++++ validation/bad-type-twice0.c | 4 +- validation/bad-type-twice1.c | 6 +- validation/compare-null-to-int.c | 6 +- validation/cond_expr.c | 4 +- validation/conditional-type.c | 32 ++--- validation/enum-mismatch.c | 6 +- validation/eval/asm-degen.c | 36 ++++++ validation/eval/asm-memop.c | 47 ++++++++ validation/expand/asm0.c | 23 ++++ validation/expand/compound-literal.c | 26 ++++ validation/linear/asm-memop.c | 23 ++++ validation/linear/compound-literal02.c | 1 - validation/static_assert.c | 6 +- 29 files changed, 455 insertions(+), 147 deletions(-) create mode 100644 validation/asm-bad0.c create mode 100644 validation/eval/asm-degen.c create mode 100644 validation/eval/asm-memop.c create mode 100644 validation/expand/asm0.c create mode 100644 validation/expand/compound-literal.c create mode 100644 validation/linear/asm-memop.c -- 2.23.0