There are special problems when a typeof() expression can't be evaluated. Catch this here. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/cast-bad-01.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 validation/cast-bad-01.c diff --git a/validation/cast-bad-01.c b/validation/cast-bad-01.c new file mode 100644 index 000000000..4a7a397ea --- /dev/null +++ b/validation/cast-bad-01.c @@ -0,0 +1,13 @@ +extern unsigned long l; + +int foo(void) { + return (int) (typeof(fundecl(0))) l; +} + +/* + * check-name: cast-bad 01 + * + * check-error-start +cast-bad-01.c:4:30: error: undefined identifier 'fundecl' + * check-error-end + */ -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html