From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RWNTH9BFcGA2MAAAWB0awg (envelope-from ) for ; Fri, 09 Apr 2021 08:17:20 -0400 Received: by simark.ca (Postfix, from userid 112) id 71ED71EE14; Fri, 9 Apr 2021 08:17:20 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 62DD71E789 for ; Fri, 9 Apr 2021 08:17:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B8449398B432; Fri, 9 Apr 2021 12:17:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8449398B432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617970638; bh=E61TlzV1iDWJ6XinKrJQohqXoZpOMNkSXDajaWC3xdE=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Mz7CNHzm8CiJRPrtejxmUFEItjLmrlB61wswY5GNyERW9/UTVonYun76aJcER51TJ uvz5Vcdtw8TA1xlxpVaftMekaKdaGCDBsJAJJS193M8ORdu/ix6U8tEZGQEkBsmaqy HG9/WxfMKEwbfXYnSTjhRQV/GVCU1FoFkyaeGvwQ= Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id 22960388C005 for ; Fri, 9 Apr 2021 12:17:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 22960388C005 Received: by mail-qt1-x830.google.com with SMTP id m16so3329861qtx.9 for ; Fri, 09 Apr 2021 05:17:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E61TlzV1iDWJ6XinKrJQohqXoZpOMNkSXDajaWC3xdE=; b=K4R5EiDvaIx28o8JG5/qDLaSe2lVrUz82uaemUDvQkFwRCjZIt5ru7/UESjSExl/wq Ckb1uWQ6OukAe1e9BvV2uGJGjwFGcajKWw0umOW5Ng6t0hlPPgAUKQuWrpV5kYQQNs0V erw0lzjrYvrA0gQo2sW4iLohqoKRuaNq+MAjJwUIt4SjyjK/IzwZ7L39kQdlRk3Ta2UK eH6ROb8jCkx5SvF4NeI78q/qCDCC6537sI2/xkQuCnAoBbsd+AqKD+ndOJJlM1ml0lEi P0zAloFNTjNdMfS0zrGdlNto7fzggknELBu69Qr4iZnMKWpvLzvM6ZDVMle/6SToxwRw oCIA== X-Gm-Message-State: AOAM5314PrsoSyJHk3u46QEEAuzCQsgQghTsMejw3nE16xh1PFVQ+Cnw 6zhcGONMTRDlUJp2+ahYf2BXN7c5yGO59g== X-Google-Smtp-Source: ABdhPJx2SudX7Qvx/FPMZRgxWh6f0DXG7mo0ucDl+K64/nPEmL0N6xWPv5EIoJ5Tk8c1goi+Ic8tAQ== X-Received: by 2002:ac8:4c89:: with SMTP id j9mr1871994qtv.161.1617970635664; Fri, 09 Apr 2021 05:17:15 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:5cf4:99ea:9b1e:2653? ([2804:7f0:4841:2841:5cf4:99ea:9b1e:2653]) by smtp.gmail.com with ESMTPSA id c17sm1615480qtd.71.2021.04.09.05.17.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Apr 2021 05:17:15 -0700 (PDT) Subject: Re: [PATCH] [sim,rx] Silence warning that turns into a build error To: gdb-patches@sourceware.org References: <20210408195143.1349459-1-luis.machado@linaro.org> <07869142-e6ce-b480-56dc-334f2108e4b0@linaro.org> Message-ID: <46c14f4d-e650-74b2-64a6-19c65816ab06@linaro.org> Date: Fri, 9 Apr 2021 09:17:11 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 4/8/21 5:57 PM, Mike Frysinger wrote: > On 08 Apr 2021 17:23, Luis Machado via Gdb-patches wrote: >> On 4/8/21 5:16 PM, Mike Frysinger wrote: >>> On 08 Apr 2021 16:51, Luis Machado via Gdb-patches wrote: >>>> + FP_Parts a = {0, 0, 0, 0, 0}; >>> >>> wouldn't it be simpler & equiv: >>> FP_Parts a = {}; >> >> I find that it works, but I'm unsure if it is a standard way of doing it. >> >> The C reference says: >> >> "When initializing an object of struct or union type, the initializer >> must be a non-empty, brace-enclosed, comma-separated list of >> initializers for the members." >> >> So I went with the most obvious, as opposed to going shorter and more >> opaque. > > my concern is more about having to tweak this whenever fields are added > or removed. > > i couldn't remember if the ={} syntax was a C++ extension, or in C11. > if it's a C++ extension, i *think* ={0} will work even in C11. > -mike > I think it is a C++ thing. I pushed it with the {0} initializer now.