From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by sourceware.org (Postfix) with ESMTPS id 030D4385702E for ; Thu, 4 Mar 2021 20:10:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 030D4385702E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=panix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zackw@panix.com Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4Ds26p47Yfz1hSw for ; Thu, 4 Mar 2021 15:10:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1614888642; bh=Q0qAcNYwm1rQU1bGvaTFo19vCpFh9lp5yLH0B2i5Awo=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=PJvwwfcbs0WzDdtji3QMoC3O7hLcwlPk07zGqBIToTsZiIKWQKfYWePuLYnzhNiML /uBe5t5n9W88gxfe5TuoGg3zwQ0C3pHIkIvM2xKeko/NMisoDz9ncVJ/ON5I86DMdL Jzeu0GSXaxbLZ5zw/6MMOKCNLkDTdeyKtiW3B84c= Received: by mail-ej1-f41.google.com with SMTP id mm21so51564360ejb.12 for ; Thu, 04 Mar 2021 12:10:42 -0800 (PST) X-Gm-Message-State: AOAM532eppj/kHETd1u4swD4tDQjdeQBo8VQGPpkBRu5wGRHcc/qcKzE PD3DjSFsb1gYyhp7nx428WNNCPkJwBS/FGPizJI= X-Google-Smtp-Source: ABdhPJwcNsDbBnHU4569jGdPbB7EIo2qINTWjN08XDv6P2NaTD2IlAuSO40vQ3nLd84fbAQpFAHOw/dEH/+fzNJOfrE= X-Received: by 2002:a17:907:2661:: with SMTP id ci1mr6141559ejc.403.1614888641545; Thu, 04 Mar 2021 12:10:41 -0800 (PST) MIME-Version: 1.0 References: <20210304194534.130735-1-alx.manpages@gmail.com> In-Reply-To: <20210304194534.130735-1-alx.manpages@gmail.com> From: Zack Weinberg Date: Thu, 4 Mar 2021 15:10:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] makecontext.3: Fix function declarator with empty parentheses. To: Alejandro Colomar Cc: libc-alpha@sourceware.org, linux-man@vger.kernel.org, mtk.manpages@gmail.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 20:10:44 -0000 On Thu, Mar 4, 2021 at 2:48 PM Alejandro Colomar via Libc-alpha < libc-alpha@sourceware.org> wrote: > glibc uses 'void (*f)(void)' for makecontext()'s second parameter. Did you mean =E2=80=98void (*f)()=E2=80=99 ? C11 marked function declarators with empty parentheses as > obsolescent: > > > > 6.11.6 Function declarators > > 1 The use of function declarators with empty parentheses (not > > prototype-format parametertype declarators) is an obsolescent > > feature. > > > Let's use the correct syntax by explicitly using '(void) Unfortunately this change would be incorrect. makecontext=E2=80=99s second parameter really is a pointer to a function that takes any number and type of arguments, and there is no other way to write that in C than =E2=80=98vo= id (*)()=E2=80=99. Which, yes, means this function cannot be declared in confo= rmant C11. This is actually the Austin Group=E2=80=99s primary rationale for deprecati= ng makecontext and its relatives. zw >