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.133.124]) by sourceware.org (Postfix) with ESMTPS id 398083858C56 for ; Thu, 13 Oct 2022 17:24:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 398083858C56 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=1665681884; 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=hCUVy8cnW3KyyRZgpWvaQCfG+PXhm3aT/2lyumlZlq8=; b=A3BS6o7Xy73sIADk8sJUWlZ6UpYSYcH+UfcT3nO9FshXtwAHSMtBFryiC9zksLLmYih87k +PQzVoOtY+3QnC8OfqsHIKIxz8g421Lb6HRIwxerIAJr51W4ZUteewGudvMqXQNgvTbjQ8 hDyE63yldZFnELRgWUrmKb7XP/1DYlI= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-592--czlTG1wN26Zx5WEvBvscw-1; Thu, 13 Oct 2022 13:24:43 -0400 X-MC-Unique: -czlTG1wN26Zx5WEvBvscw-1 Received: by mail-qv1-f69.google.com with SMTP id t19-20020a056214119300b004b03f58b1abso1950163qvv.17 for ; Thu, 13 Oct 2022 10:24:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hCUVy8cnW3KyyRZgpWvaQCfG+PXhm3aT/2lyumlZlq8=; b=xhkseOLCIgqVX41o1vF1f3YHKCw5vqDYGWT80726mGxyA42pQIDYFwlvBQeP0GrBJ+ gN51HhQHsc/smrsguHGf1s25esQ7mrmZyQkRgjuy7CPF0mQmJAp9aK3pKfliVMA0YL3g lQ1jKyv/5J8LHbqimNYgfrez/gsstLeXBBbxbq1igzpcijv9cU4jicOKl48VYoL6zcrJ WUhpV5+yFodQQ+hGP4EG43TUAoCoIx2kd+lfrG7du7MzNNVJ5Nevf9fKMH+oLgL7aN4h HXmDdWwhJw6OM9ktnu+8tkT5/JJv7lF5GO9VJmQJ+aUwiG1ezeOu+SVRsDZTAhyvuCBv plpA== X-Gm-Message-State: ACrzQf3riAtF1scOW/MXIdht4uAQU7zSCcdZmjovBfxsMtdm4Ep1UDDI 8fz01un8/DEarS0DNv0sGV3aiTzW9OSn78HCZ6ygMRuH2Vxtdjfbj4QmGTv4F6RHmJhaTwXnlW/ 89aWcybQ= X-Received: by 2002:a05:6214:27c9:b0:4af:b016:5ff6 with SMTP id ge9-20020a05621427c900b004afb0165ff6mr646143qvb.23.1665681883283; Thu, 13 Oct 2022 10:24:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fLvnksqO6oThEX2mbfY5xb0oJzNLYskBJDRIsYZW8oGo7DcB/sGl2R174zGKZdH2KW3JG+A== X-Received: by 2002:a05:6214:27c9:b0:4af:b016:5ff6 with SMTP id ge9-20020a05621427c900b004afb0165ff6mr646125qvb.23.1665681883015; Thu, 13 Oct 2022 10:24:43 -0700 (PDT) Received: from [192.168.1.101] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id r9-20020a05620a298900b006b953a7929csm252656qkp.73.2022.10.13.10.24.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 10:24:42 -0700 (PDT) Message-ID: <2a959ba5-e9a3-768b-2d66-cba2bc389eca@redhat.com> Date: Thu, 13 Oct 2022 13:24:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: Handling of main() function for freestanding To: =?UTF-8?Q?Arsen_Arsenovi=c4=87?= , Jonathan Wakely , gcc-patches@gcc.gnu.org Cc: "gcc@gcc.gnu.org" , Jakub Jelinek , "Joseph S. Myers" References: <2489d88a-e80b-2f89-bac5-07c0b70bc175@redhat.com> <16718001.dR7co8bJll@bstg> From: Jason Merrill In-Reply-To: <16718001.dR7co8bJll@bstg> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 10/13/22 13:02, Arsen Arsenović wrote: > Hi, > > On Friday, 7 October 2022 15:51:31 CEST Jason Merrill wrote: >>> * gcc.dg/noreturn-4.c: Likewise. >> >> I'd be inclined to drop this test. > That seems like an odd choice, why do that over using another function > for the test case? (there's nothing specific to main in this test, and > it doesn't even need to link, so using any ol' function should be okay; > see attachment) It seemed to me that the test was specifically checking that main was treated like any other function when freestanding. > The attached patch is also v2 of the original builtin-main one submitted > earlier. Tested on x86_64-pc-linux-gnu. This revision excludes the > mentioned pedwarns unless hosted. I was arguing that we don't need the new flag; there shouldn't be any need to turn it off. Jason