[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] misra: add deviation of Rule 5.5


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Lira, Victor M" <VictorM.Lira@xxxxxxx>
  • Date: Wed, 23 Apr 2025 11:16:49 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=n64qvoZYpJN9OEC17V23CLstYUTlZjpcxuIhKDXYZ+Y=; b=uw/UnEZ3vllKg14tiZb63VEDAwLNmln8T+9aD6dQzcHMDQb8njDIeK9PqK6bmCwCD0HI7mhGII1Q/B8OgU2APK9J4t5RdI2VWzMZrWxO5chTqlT8nJnATquD2FaynQ1Rp7kIXClLIIwTL3/ErnzxWjE3KX7u+Amq6HWhQXIChU0zItMcNr4pugdQKW8aHUYYbum3KNfo4vsya0Wp7szyWvFsC/ETpHTlXtBWE4YLZ9hrxGbicueq85x6yw+PvMLJm1aGqQBzO3tswF9pHqFyXKg355AS3GE4WvDWVkreQj86dhDPVeJ3mjN6//J58d6SRQSoXWJ7LUCGCJjKrFTsDQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VywY1o3Nro3z419pzWp9jgWD4tj9tbeF+uGdzZz4gbKscgJwje9VDl4v4Unt3HkkA8qmYn0PoCgEcPlXp8ek4pDzSY/4AvLGuK0+9JSdagLw9pTJEvtXp3Oii/FV6lU5XheqWIN2nD+s+1SftlGEa42F1p7NN1e5j3JlRvGw0at8NZ2I6/iupJ7V//AQMWemJzG1YMbJeXXtQa3X2oUccmgzIdvz81o/TbWeYMRqT/xBU+cqmTR79qEadr53Wm89efFIvwrT+EiL70VbcYMKaywrWNM3sMo6A9d8et8BF4m9JS8D09qF4GfWGweIuXdbqmMUjCR+a+fGGABsMlFnhA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Federico Serafini <federico.serafini@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Wed, 23 Apr 2025 18:17:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Continuing a discussion from before:

On 4/22/2025 11:44 PM, Jan Beulich wrote:
Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.


On 23.04.2025 01:43, victorm.lira@xxxxxxx wrote:
         memmove.
       - Tagged as `deliberate` for ECLAIR.

+   * - R5.5
+     - Clashes between function-like macros and function names are
+       deliberate
They may or may not be deliberate, depending on context. I don't think it's a
good move to deviate this more widely than necessary. If I get the expression
above (in deviations.ecl) right, even

void func1(int);
void func2(int);

#define func1() func2(0)
#define func2() func1(0)

would be deviated, which I don't think we want. Especially when, in a less
contrived scenario, the clash may not easily be visible.
OK, I see the issue for different functions. Does it make sense to say it's deliberate when it's the same identifier?

        void func1(int);
        ...
        #define func1() func1(0)

Could this be deviated?


Victor




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.