mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Rule 13.1: Initializer lists shall not contain persistent side effects Invocations of functions in initializer lists cause violations of rule 13.1 if the called functions are not tagged with __attribute_pure__ or __attribute_const__ as they can produce persistent side effects. Handling these violations with attributes is not always possible: the pure and const attributes may cause unwanted and potentially dangerous optimisations. To avoid this problem ECLAIR allows using the same attributes in the -call_properties setting. Additionally, it adds the noeffect attribute with the following definition: "like pure but can also read volatile variable not triggering side effects" These patch tags some functions used in initializer lists to address violations of Rule 13.1. No functional changes. Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>