[PATCH] asm: warn on invalid empty constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Empty ASM constraints are invalid. So, catch them
at parsing time and issue a warning.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 evaluate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/evaluate.c b/evaluate.c
index 919c944cf..74c7fd1d8 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -3503,6 +3503,9 @@ static void parse_asm_constraint(struct asm_operand *op)
 	int c;
 
 	switch (str[0]) {
+	case '\0':
+		sparse_error(constraint->pos, "invalid ASM constraint (\"\")");
+		break;
 	case '+':
 		op->is_modify = true;
 		/* fall-through */
-- 
2.23.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux