From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [173.255.242.215]) by sourceware.org (Postfix) with ESMTPS id 86C7B3858C62 for ; Thu, 8 Jun 2023 13:46:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86C7B3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=80x24.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=80x24.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 417031F542; Thu, 8 Jun 2023 13:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1686231986; bh=l6pfmBH4R/mWDOq0ZqeYKsL8Zmt76FIDKa9q/T7nfqs=; h=Date:From:To:Subject:From; b=MRZcd+zTboINoq2XM4ldtui2oPyc4EAfyqhnykH6V9DrWIAZrF4IW3jBvaMm6b8SW G31NhApjJ8cx1iCUUmuSXJWMN4cLLaA4UATC0w4tLYrWkQaZOwhYV/Q7xr2QdvQ+Aa jmhE4fvBycWvEE/iePSn74rIYfpcTATDJjOqs5n4= Date: Thu, 8 Jun 2023 13:46:26 +0000 From: Eric Wong To: jit@gcc.gnu.org Subject: __attribute__((cleanup)) support in libgccjit? Message-ID: <20230608134626.M184090@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, I'm considering libgccjit for use in a new GPL3+ scripting language and I am wondering if declaring locals with __attribute__((cleanup)) is supported by libgccjit. I find gcc_jit_lvalue_set_alignment in libgccjit.h, but not many other attributes for locals.. I'll likely use libgccjit regardless since it seems like it could make libffi redundant (or maybe I'm wrong on that bit...). I might steal LuaJIT's C parser to deal with parsing headers and structs; not sure if gcc exposes a C parser as a stable API... Thanks.