From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 6ED013857BAB for ; Tue, 21 Jun 2022 18:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6ED013857BAB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,210,1650960000"; d="scan'208";a="77520504" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 21 Jun 2022 10:50:54 -0800 IronPort-SDR: YMEGsv1jZkQr4BlnWFbQjkqeCrKEA3dHs79ii1qzs5R3HAHfZ97Nmz2NuP1kGszrywPKyuqVax ZItwxRyiNpidYmHUUTuBvLdeJD2/IJsBQyZzItzqHxUxrr0zo1NhaeOtlsTlFBpGhvH56y1tvD iW/gkvr0bryVOg1Bt31YgK/IxeYs4i6DwaJsOYh9LWJUaeVoWogfG0StYmYuvK+zC6UFXLVRdx BtPWuayWfeQY7dFGj/yr9x1TOLReOvvqG2S8HTey6IeNc1QJ7bz59QcfAaKRXtN987aK/1Bodv e6c= Date: Tue, 21 Jun 2022 18:50:49 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: David Malcolm CC: Mir Immad , Subject: Re: [PATCH] static analysis support for posix file desccriptor APIs In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3112.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 18:50:59 -0000 On Tue, 21 Jun 2022, David Malcolm via Gcc wrote: > So ultimately that's something we want to fix, though exactly how, I'm > not quite sure; we presumably want to look up the target's definitions > of those macros - but I don't think the analyzer has access to the > cpp_reader instance from the frontend. Normally that would use a target hook to specify the values of those macros. The default would be the traditional Unix values of 0, 1, 2 for O_RDONLY, O_WRONLY, O_RDWR, while Hurd would need its own definition of the hook to use values 1, 2, 3 (I don't know if there are any non-Hurd systems not using the traditional values). -- Joseph S. Myers joseph@codesourcery.com