From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 98UxMu+J819+JwAAWB0awg (envelope-from ) for ; Mon, 04 Jan 2021 16:34:39 -0500 Received: by simark.ca (Postfix, from userid 112) id B28471F0AA; Mon, 4 Jan 2021 16:34:39 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 0C2331E965 for ; Mon, 4 Jan 2021 16:34:39 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CBB9388C01B; Mon, 4 Jan 2021 21:34:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CBB9388C01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609796078; bh=y/NKEg3HpphkARzg+eXiMPV/EfseQdO/hjHO5O+PhfE=; 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=VuI+Xcp+2Pe/YpMV5B9KKIxvg8Chg8NXdx5S4Hydv9+zfOY3TufX30dk8q8SADeug /mCnWuPsSC8mOPSr6WI9touOtvo5zHrbDiO9cs7bti1NYr+xl3O8IxgH06oKm5CW3m KYPJFyQY5gCXkV/EtqTO1dF4Mv5ZI4dnHZsRyDFY= Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by sourceware.org (Postfix) with ESMTPS id 5C2F5388C01B for ; Mon, 4 Jan 2021 21:34:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C2F5388C01B Received: by mail-qk1-x734.google.com with SMTP id c7so24839174qke.1 for ; Mon, 04 Jan 2021 13:34:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=y/NKEg3HpphkARzg+eXiMPV/EfseQdO/hjHO5O+PhfE=; b=jQ+80TVrfxG7Bsmbq0QT+kisVqIl1NyWqaWeAbv0gWXor04V7Rj64qYY/GUH8PDrCx 97ArT0h2LP+Dm0HClIkOdmt52waOMDnaTRlSS6Jy3HeZFpJaX1B9CcTYMkfBXdrH4NFv unUQv3R/IC74WKtZjO2T+uC0t8K/BHiHrqU5BJ4c0IX4l5xPg2dNeVvmjwdL/iMg2lY2 Bm/6F4dyfHTymUYBWhER1fg62850RrMhkkkLCn75Udh9acQJLdvpRkHMnPxzxCAKJDMT DOzSwUCcP6PlNYISdR27gKpUhEjGL+q79bkvB/cjaanegN1JwIjm1PmOSzJsyhKfMU+t NN2g== X-Gm-Message-State: AOAM532A11NIE4SzfdOGVb5f7hfwGJgoNMp/p/JIFtTdIA3xKPoDkblV Q8g0xtkv8OLACjyvUhNG4x0R4A== X-Google-Smtp-Source: ABdhPJzg0aLsx+VVrDcXetlzOmI7XYd+b9ZRN0lH0P1mWo178J2Wr88OWWGBnq1dROXrLgPCYwWc1A== X-Received: by 2002:a05:620a:1392:: with SMTP id k18mr59187608qki.225.1609796075007; Mon, 04 Jan 2021 13:34:35 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:7445:c3c:f332:7145:6122? ([2804:7f0:8284:7445:c3c:f332:7145:6122]) by smtp.gmail.com with ESMTPSA id s14sm18735770qke.45.2021.01.04.13.34.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jan 2021 13:34:34 -0800 (PST) Subject: Re: [PATCH] Fix building gdb with gcc-4.x To: Bernd Edlinger , "gdb-patches@sourceware.org" , Simon Marchi References: <4c952eae-317a-bbf9-d0c9-38c4b2b3fa8c@linaro.org> Message-ID: <57fe513f-b93a-3ef3-8114-a2a08310c3db@linaro.org> Date: Mon, 4 Jan 2021 18:34:32 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <4c952eae-317a-bbf9-d0c9-38c4b2b3fa8c@linaro.org> Content-Type: text/plain; charset=windows-1252; 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 1/4/21 6:16 PM, Luis Machado wrote: > Hi Bernd, > > On 1/4/21 5:57 PM, Bernd Edlinger wrote: >> Hi, >> >> with Luis' commit of today the trunk is no longer able to >> be compiled with gcc-4.x. >> >> The problem is std::is_trivially_default_constructible is >> not defined before gcc-5 although the compiler supports C++11 >> > > Sorry for the breakage. It looks like GCC 4.x does not fully support > C++11, although it used to be able to build GDB. > >> I am not sure about what's the best approach for conditionally >> enabling the code, especially for compilers other than g++. > > Right now it looks like GDB's requirement is a compiler that (fully?) > supports C++ 11. It doesn't seem to name specific minimum versions of > compilers. > > With that said, I wouldn't mind a conditional in the code to support > builds with GCC 4.x, if that is deemed important. But as we start using > more and more C++ 11 constructs, breakages may happen again in the future. > >> >> >> This fixes the build for me. >> Is it OK for trunk? It's worth mentioning that I'll be changing this code again in the future, and that static assertion will likely go away when I do.