[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 0/4] address MISRA C:2012 Rule 15.2
- To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 7 Nov 2023 11:52:05 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FsAhqtdT5SM0DwnyAfC+mvIiD17IMVQpilAdUZ44mnU=; b=NEs6n549vnf32b26WQojg3LVpOZWzob+IscobPlKvlFEtC1EviPrHG/pqBPizm8reMGfgc0p9YqVBO++rI6LT1Qc9nUI2YG7jY6WPUQ4XWueKhAn0yCbH5CkXvk1homGKFerUQ5nLL2ydVV8wJ8DSbGDKlmgs+RlYI5DS7PohSbXD3jdllYs8GECGjM2ePfGOtzpXNQBsMng/Pg54DE5FjJROKhAyjT5zVtdCQI9Wmqff9hubxwxqf2VWC+ebubywPcq7ruTX1fJgIzoZnbXoHpWDkvi8NxswP9G4Ch9AGkpSdErL4Xz9Y3dL6PXKAUA1aHsLd8uCoY3unqMsCxe4Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EfT6ETwHUOOkqXRhe8k42TF02XLgs8FemXGwqyCg6/lFJGazMIm1fZh8mkTdiYm4gzBp83hgzhqnXL4goPJTSnsnUPNjRBB74bwoUCT4k3mRSPB5CzLhHV8FJ5GkJbgNvMN+hUBBp2FZojDwpETb0LuLL3+hGyEWQJ0fg3GZUG2rs29yEb9D9hL35ThXo0gToEcOyuiJs6Zfrhq+dudY+m6sPbtssgxPBtWVrP3dSVipbCjV4v5LTVT6xpzJccmSMgbm/1g4cflNULoSpz6pO3w8CGCVGvFWQPEigGeZI4NH8aNpdZ8pdbF654/63W2fba8ynhcMZQxZXwQyFNdSyg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 07 Nov 2023 10:52:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07.11.2023 11:33, Nicola Vetrini wrote:
> This series is aimed at presenting some strategies that can be used to deal
> with
> violations of Rule 15.2:
> "The goto statement shall jump to a label declared later in the same
> function".
I don't recall this rule being discussed on any of the meetings.
> The rule's rationale is about possible developer confusion, therefore it could
> be argued that there is no substantial gain in complying with it, given the
> torough review process in place.
To be honest, forward goto have potential of developer confusion as well: All
other entities need to be declared / defined before they can be used. Just
labels don't. (Or have I missed any other outlier?) IOW if I saw Misra make
any rule here, I think it ought to suggest to avoid using "goto" altogether.
Jan
|