From patchwork Sat Aug 19 08:01:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andris_Pav=C4=93nis?= X-Patchwork-Id: 136083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp1899874vqi; Sat, 19 Aug 2023 01:03:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHFPrzu+fI35viWisj5/J2IBKhesqw64SlqdMlbrfFBe5RNPUbWvrEstLNxTzteTD2IPqQ X-Received: by 2002:a17:907:75e6:b0:994:5b1:6f92 with SMTP id jz6-20020a17090775e600b0099405b16f92mr895876ejc.3.1692432198676; Sat, 19 Aug 2023 01:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692432198; cv=none; d=google.com; s=arc-20160816; b=wlr6c+QpzA1YL4Ty4wve9/u/gyvaVgTyE/JXkJ0mklFw7zLs94up/00feut6O+ELK6 xd6JOIXgtDANpnNSK4dpY/ppKGAcNOwvskhFrD8y446R4PXmp2T4stp1O4aGIzymyqjE +il/7gDb7QL9p/IxwFhh4pSq1WqCfJ/AR4igH/XEdHSRqpIJlUwzlWEmybMH3nOMe4H1 MwVUkFLimYdsHkn9j1RofXX/5dkh81TzW/kJgrho0BipgTVqnVax0Urk5w/eSGdX1HWj OH4PA+bAWjJk5BYi8YlP6Q1KwRBEaCnYQuGEb5LjQxmvNGtQ/c8f32zaZfzlj9KVvJw8 be4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:to:from :content-language:user-agent:mime-version:date:message-id :dmarc-filter:delivered-to; bh=ygr3Luq0SMP7oJAjK8IAXZCKGxBr+vtV/0y4d1A+m5g=; fh=Vyq2ydj9I0HH0B7XW1PZCz2i3Pz3bIbvrdbIadHl0nQ=; b=MCwqmYEUO5G1ouJrEOjSI1RofbYUNMX9t1CDVwXBSpuItdEUsF3nsdPpT41xLEJVyu XmG3nlgorw/96bHXfSu/0cBnam98HEsbncxxzUwJEr+swsN+K6Oq5X7xAjNU6jrnuI+A DxsFFv4zffQ9ns5yzlFB1hed0O/i5ae3B57UM7kzj4cpfnpk+pQj/GW2P/yBA8++kswH 4+kxSAiWMfyFFKNcYlGPJ3yNNLCG1XvMFeSoK9OiuzQvGPd/ny5MDnzwCCoojBzJz+p5 95SHiQlTFrQbpfmdvrqj/Z/7Uh4S7HfETPRfLoRznUXAFF0K5s0wmCDXQJC1XPi7YgD2 Kp1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id i10-20020a170906264a00b0098718971f52si2597321ejc.87.2023.08.19.01.03.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 01:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F41F3870885 for ; Sat, 19 Aug 2023 08:03:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from fgw22-4.mail.saunalahti.fi (fgw22-4.mail.saunalahti.fi [62.142.5.109]) by sourceware.org (Postfix) with ESMTPS id 8778A38582A3 for ; Sat, 19 Aug 2023 08:02:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8778A38582A3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=iki.fi Received: from [192.168.1.10] (dsl-hkibng21-50dc56-104.dhcp.inet.fi [80.220.86.104]) by fgw22.mail.saunalahti.fi (Halon) with ESMTPSA id 9470e94d-3e66-11ee-a9de-005056bdf889; Sat, 19 Aug 2023 11:02:28 +0300 (EEST) Message-ID: <8f08933c-d988-c806-6a75-c8a12574c268@iki.fi> Date: Sat, 19 Aug 2023 11:01:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US-large From: =?utf-8?q?Andris_Pav=C4=93nis?= To: GCC Patches Subject: [PATCH][Ada] Fix syntax errors in expect.c X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774643785621574684 X-GMAIL-MSGID: 1774643785621574684 Noticed trivial syntax errors in gcc/ada/expect.c when tried to compile gcc 13.2 as cross-compiler for target i686-pc-msdosdjgpp. Errors were there since Tiedostossa, joka sisällytettiin kohdasta expect.c:54: expect.c:Funktio ”__gnat_waitpid”: expect.c:353:13:virhe: expected ”(” before numeric constant  353 |   } else if WIFSTOPPED(status) {      | ^~~~~~~~~~ expect.c:358:1:varoitus: ei-void-tyyppisen funktion loppu saavutettu [-Wreturn-type]  358 | }      | ^ make[5]: *** [../gcc-interface/Makefile:297: expect.o] Error 1 Errors were there since commit 9e6274e0a3b60e77a42784c3fb6ef2aa3cfc071a(Wed Dec 15 19:26:50 2021 +0600) Fixing these errors (attached patch for master branch) was not sufficient for building Ada cross-compiler, but it fixed compiler errors. This would perhaps qualify for trivial change, but it seems that I no more have write access (I got it in 2015, but have not used it for a long time. Perhaps I do not really need it) Andris commit 64c48aa99656e06d5728bf5837da3bbc50ae4cc5 Author: Andris Pavēnis Date: Sat Aug 19 10:40:22 2023 +0300 Fix syntax error gcc/ada/expect.c(__gnat_waitpid): fix syntax errors diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index e6899632bc9..7333c11d954 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -346,11 +346,11 @@ __gnat_waitpid (int pid) return -1; } - if WIFEXITED (status) { + if (WIFEXITED (status)) { status = WEXITSTATUS (status); - } else if WIFSIGNALED (status) { + } else if (WIFSIGNALED (status)) { status = WTERMSIG (status); - } else if WIFSTOPPED (status) { + } else if (WIFSTOPPED (status)) { status = WSTOPSIG (status); }