@@ -681,6 +681,7 @@ static struct token *unary_expression(struct token *token, struct expression **t
sym->ctype.modifiers |= MOD_ADDRESSABLE;
add_symbol(&function_computed_target_list, sym);
}
+ label->flags = CEF_ADDR;
label->label_symbol = sym;
*tree = label;
return token->next->next;
new file mode 100644
@@ -0,0 +1,14 @@
+static void a(void)
+{
+label1:
+ ;
+ static void *b = &&label1;
+}
+
+/*
+ * check-name: label reference constness verification.
+ * check-command: sparse -Wconstexpr-not-const $file
+ *
+ * check-error-start
+ * check-error-end
+ */