From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 812E63858D1E for ; Mon, 30 Jan 2023 12:27:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 812E63858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675081633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iJi/hyIJb5YRjx00/LcNnml+cwOose91P2HrMlrnrbM=; b=SIgYL6377bVD6WueuQoIo2eeCQnu+8SeOK0bfz2O8Ws0CvgbRLWXDXI8Yfi/BtiikriWpI YI/BG57fhQ0YBYLpspgjLR6FP9lCPFBqfuctwEqPJk2Mexc4jmF/8lK3AXYdecxt2ewuTR Id5F1zNaY26qIyEo2JAHx2R6xlxq4g4= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-75-4812OyLOPoqvgRbsRRsKSg-1; Mon, 30 Jan 2023 07:27:11 -0500 X-MC-Unique: 4812OyLOPoqvgRbsRRsKSg-1 Received: by mail-ua1-f72.google.com with SMTP id v12-20020ab05b4c000000b0060547d4c3d5so4509386uae.23 for ; Mon, 30 Jan 2023 04:27:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iJi/hyIJb5YRjx00/LcNnml+cwOose91P2HrMlrnrbM=; b=6dhG5840oOv2cvBp6y1jnskoRTs0IdlqPptfTmp5ur8UZc+ewex0Pf0NC1hKfPDxqZ AWkVkE5vMX1W36qCSGR+nnweUobsU1ALvOUxJ/t36BM7kUIkMuvZC1r7j6yeRkOZ0JKn Ii93gqEQbjWc00x5tcoNs4x8AGklWc/M7rZFSKc8loBWWr3cUQFdCEpZ4iJxg58sQeY8 ntcNrRnzJ1C3/rvUUY0hbcx0VP7PSj6h0bmIO4o+nWnMuEFbE3F4RZgjllJX9iD3lQ2+ KN2FWtYWBCbyV0uML6Vd1Tz5sObjGM7nQBlcl8OENul9v7TfnlsB5JiSN3aPwhRzr85P hsGQ== X-Gm-Message-State: AO0yUKVwC7lFjgImPncD4ZztpcoIKdQMPmKORSqVp42Qxnzgd8dYZK3k a3drIAFOidF89itzBxMCo3I9riMPro6goObTxEZ2V5TjIrl7IPd7pPYjb45ffJeG4n0R33WixUf dRyhmkA6nW8TMnrlOP/fq0ckdVdYAjX1fy6+o X-Received: by 2002:a1f:bfc7:0:b0:3e8:9184:c4b7 with SMTP id p190-20020a1fbfc7000000b003e89184c4b7mr1770276vkf.10.1675081630813; Mon, 30 Jan 2023 04:27:10 -0800 (PST) X-Google-Smtp-Source: AK7set9X4/b4b7o5m6GO4nC8Z6gfpTRq+Nd5xRZcARm59PN6coalxIqK5QTJfM2D0cSxvFXdmDH/b1NuyV7rughmy5k= X-Received: by 2002:a1f:bfc7:0:b0:3e8:9184:c4b7 with SMTP id p190-20020a1fbfc7000000b003e89184c4b7mr1770273vkf.10.1675081630617; Mon, 30 Jan 2023 04:27:10 -0800 (PST) MIME-Version: 1.0 References: <871qnc1mjo.fsf@oldenburg.str.redhat.com> In-Reply-To: <871qnc1mjo.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar Date: Mon, 30 Jan 2023 07:26:34 -0500 Message-ID: Subject: Re: C90 header compatibility To: Florian Weimer Cc: libc-alpha@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-21.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP 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: On Mon, Jan 30, 2023 at 2:58 AM Florian Weimer wrote: > > We regressed compatibility with C90 compilers because > unconditionally uses variadic macros, a C99 feature, in the definition > of __glibc_fortify and __glibc_fortify_n. > > This also impacts certain C++ compilers that do not have a > C99-compatible preprocessor. > > Should we fix this? I think so. > > Previously, we worked around this by enclosing variable-length lists in > (=E2=80=A6), but it doesn't look like it might work here. We probably ne= ed to > move the macros into a separate file, and include that file only if > fortification is active. Wouldn't conditionalizing the macro defs in-place with #if __FORTIFY_LEVEL > 0 sufficient? __FORTIFY_LEVEL can be non-zero only for gcc 4.1 or newer. That is, do these older compilers complain if there's code they cannot recognize in a #if 0 block? Sid