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 697743858C83 for ; Tue, 18 Oct 2022 14:06:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 697743858C83 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=1666101981; 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: in-reply-to:in-reply-to:references:references; bh=384lbsmAn6XqO68+j3+wxkr+1NwHo9U8P/GsX8gPmLg=; b=iCnHIl2EXkZQuxCyyn3UB6YQQ5FFQwdYMiISD33UxfAciLKT3EJsVNWH9xZ3qwICHefTd0 miltpwF1YoLgGNjXoJxct5WCKz99sjTFKqiWLBNkHFtHOXc+Q5Jw1pywPR676xPW9+dMQy nP1AfFHIV7DDikjDbrgVgg46uLVjMRQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-_Aky0thzOXuxyzsHzld9LQ-1; Tue, 18 Oct 2022 10:06:20 -0400 X-MC-Unique: _Aky0thzOXuxyzsHzld9LQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 508311C0515C for ; Tue, 18 Oct 2022 14:06:20 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C027540C206B; Tue, 18 Oct 2022 14:06:18 +0000 (UTC) From: Florian Weimer To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] libiberty: Fix C89-isms in configure tests References: <87h701jvk2.fsf@oldenburg.str.redhat.com> Date: Tue, 18 Oct 2022 16:06:17 +0200 In-Reply-To: (Jakub Jelinek's message of "Tue, 18 Oct 2022 14:57:47 +0200") Message-ID: <875yghjkfa.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.3 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: * Jakub Jelinek: > On Tue, Oct 18, 2022 at 12:05:49PM +0200, Florian Weimer via Gcc-patches wrote: >> libiberty/ >> >> * acinclude.m4 (check for working strncmp): Add missing >> int return type and parameter list to the definition of main. >> Include for string functions. Avoid calling >> undeclared exit function. >> (stack direction for C alloca): Avoid calling undeclared exit >> function. > > Spaces instead of tabs. You mean I should use tabs throughout, right? > I'd think we should #include for exit and keep exit, I vaguely > remember non-zero return from main doesn't always work reliably, which is > why e.g. in the testsuite we usually abort instead of return non-zero > from main. Don't remember if it is just for some bare metal cases or > what, which on the either side probably don't have mmap. Okay, will do that and send a v2. By the way, the stack direction test currently gives incorrect results on x86-64 due to -O2 and address comparison of unrelated objects. I assume this doesn't matter because we don't use it on compilers that support alloca natively. Thanks, Florian