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 A7CF13858CDA for ; Mon, 23 Oct 2023 08:39:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7CF13858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A7CF13858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698050363; cv=none; b=P1dqXn9G00yfRXQopvaM1xWsmuj0NzQtJedJOAnLBishGAiLrdNw4JZ+tSHZ2+Crfpn7B8Dp+ch1jl5TsRr8YNI0sqXOzDBbuHemWIzTs6lqnd0ZG8fCmuZgsLMfRxM7yIdbRpAQ7VAGd0Ueu03zLRGv2wuLejy/cnT7neV63UE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698050363; c=relaxed/simple; bh=rnxCqI7kcLfSkJWIkkwn2VvLJ81zVRAP8Bn2yHVsE00=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mDLo4sdAA0toJbdp8NJm1casLUtGWodAsEfOmaap5cx0E2EHqxKlWNvgAdHulcLT07xd0j4uwM3kYkITuedfJWllHm6VFz2ZFRSM8pDxbz4kkzKYXTBf+CTV61atdR2yNuiSXCeFJFedfbik/U33QqM4S/+xGRsFoTRZUR2UeKA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698050361; 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=p54JcnD86vRpfb3S7GSi4nFtAtTm0RYszHrUCbnk2+4=; b=NUKc0Py4QjoE3rOUkPuxn5Bfl8EyGZiJlghdfSMSwCfbkAxi0JrCzxzqPil7+EoYGlDXaO k97E3zZtsXdZtzvQXEXnhVlcI0zJu8ahKShRhvPVZN5c0NeWDKMynGL6u+7yLcv6wIk1qn IZOXI7NofV+NoI+BXlOpJpFngtQyH4s= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115-e1V9IO84Nn6ZQ9XlWE0P9A-1; Mon, 23 Oct 2023 04:39:17 -0400 X-MC-Unique: e1V9IO84Nn6ZQ9XlWE0P9A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFC3C1020205; Mon, 23 Oct 2023 08:39:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51BD32026D4C; Mon, 23 Oct 2023 08:39:16 +0000 (UTC) From: Florian Weimer To: Andrew Pinski Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] gcc.c-torture/execute/builtins/fputs.c: Define _GNU_SOURCE References: <87zg0bhzep.fsf@oldenburg.str.redhat.com> Date: Mon, 23 Oct 2023 10:39:14 +0200 In-Reply-To: (Andrew Pinski's message of "Sun, 22 Oct 2023 09:09:50 -0700") Message-ID: <87zg09wx59.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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=-4.6 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_H4,RCVD_IN_MSPIKE_WL,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: * Andrew Pinski: > On Sun, Oct 22, 2023 at 12:47=E2=80=AFAM Florian Weimer wrote: >> >> Current glibc headers only declare fputs_unlocked for _GNU_SOURCE. >> Defining the macro avoids an implicit function declaration. > > This does not help targets that don't use glibc though. > Note for builtins testsuite there is a lib-fputs.c file which will > define a fputs_unlock which is how it will link even if the libc does > not define a fputs_unlock. That's a good point. I've sent a v2 which also adds a prototype declaration in addition to _GNU_SOURCE. I've thought about it for a bit and it seems to be the least intrusive option. Thanks, Florian