@@ -121,6 +121,14 @@
* ::
*
* struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
+ *
+ * The static variable `start` gets dropped by clang compiler in optimized
+ * build as zero sized arrays aren't C-standards compliant.
+ * https://github.com/llvm/llvm-project/issues/60967
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108915
+ * Adding attribute((used)) allows the symbol to be preserved. Note that
+ * attribute((used)) and attribute((unused)) do not cancel each other as
+ * they had different semantics.
*/
#define ll_entry_start(_type, _list) \
({ \