|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3] automation/eclair: generalize the noreturn function-pointer deviation
On 2026-10-19 10:51, Dmytro Prokopchuk1 wrote: The R11.1 safe cast only matched void noreturn (*)(void *). Accept a conversion where noreturn is omitted and the signature is otherwise compatible. canonical() covers typeof destinations, andcompatible_deep_unqualified keeps the parameter and return types aligned.Discarding noreturn does not change the calling convention. Code after the call is unreachable when every possible callee is noreturn. Leavingthat code in place is a tolerated Rule 2.1 violation. The full rationaleis in docs/misra/deviations.rst. Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx> Acked-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> # automation/eclair_analysis/.* --- Changes in v3:- Reworded the deviation text per Jan's review: "noreturn omitted but anotherwise compatible signature", "all of the possible callees", and a tolerated Rule 2.1 violation - rules.rst: use '(void *)' spelling Changes in v2:- do not claim that discarding noreturn leaves compiler behavior unchanged - write that code after the call is unreachable, and that Xen's behavioris the same (whether the compiler deletes that code or leaves it) --- automation/eclair_analysis/ECLAIR/deviations.ecl | 9 +++++---- docs/misra/deviations.rst | 12 ++++++++---- docs/misra/rules.rst | 8 +++++--- 3 files changed, 18 insertions(+), 11 deletions(-)diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.eclindex 6cdb10a129..c7a800c62f 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -394,11 +394,12 @@ constant expressions are required.\"" } -doc_end--doc_begin="The conversion from 'void noreturn (*)(void *)' to 'void (*)(void *)' is safe -because the semantics of the 'noreturn' attribute do not alter the calling convention or behavior of the resulting code." +-doc_begin="The conversion from a noreturn function pointer to a function +pointer with noreturn omitted but an otherwise compatible signature does -- Nicola Vetrini, B.Sc. Software Engineer BUGSENG (https://bugseng.com) LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |