From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by sourceware.org (Postfix) with ESMTPS id 398473858430 for ; Wed, 18 Oct 2023 08:38:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 398473858430 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gwmail.gwu.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gwmail.gwu.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 398473858430 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697618293; cv=none; b=ARyEf9GuJFjJgWlLCuSPKvWdPvFwKFZyM5yx61lnrS8sB86TL+rznvrT1bjRCIP2N+obcgye6rTWXiYfFhlDbhjDzl/mYik11iAOCMd/OgeNS3aTWNxF4w/DmnCDgNGkYfULxRYKMIyJdJBhdsf4M/7/KkMcuev9k4baZBp8y2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697618293; c=relaxed/simple; bh=ISIel51xXwTQrD0/cn/fjAvmKXamjswY74tYe1ARs1g=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=ZcbRvmyIEkmVjhGJOZqzhaGNMatRGoNb2jIJ68zHP3GCR/r+gLBPC8a2TKG8z6FfYPPxxdngJ4ZTZpSiMKWHefUTqAnlfRJTIJl9x8ZXcOR/XSyI91BJsMquGvZO7XkPdwak3syoRCXL6wr0ytHE2ADEwOEhf1H6Ul+YGMPZ2kQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-4a18f724d47so1995319e0c.3 for ; Wed, 18 Oct 2023 01:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gwmail.gwu.edu; s=google; t=1697618290; x=1698223090; darn=gcc.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=frU47Mc3V4igqnZKtDiFH46Wpz0S9lK33X7o+WQ5t3I=; b=dvM2KJwr+3nmlMJDoaVJHWZa+HJpe2x8x6CDWm5m/IO78okqrCK8gYebapYejLy0dw V6AcWQM4rmXL887e3lrYeka471lrjvukoANpDLk07gZdwnLBEzvgglDgCCFSB0GWF1gq FAgh2qMt0RI3SS10zGGFWjurnv4MM+wa0ae2H3M26o65csVVg8q3tYH0z9YVV2aaFOTq hVlz1AlfyqvbkM9Q3S1QgTzZ/WcDLy+OOWpDqZP09ShwBV/N3FW9wVwvzRXGDkCjUtI2 mAcq9jPVjOTZLxKAq8e3MDZlr+TDQzq+pjpNNs8KCtzz8PJ77f2CuB2kVUrwHOqoCz+T 4p2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697618290; x=1698223090; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=frU47Mc3V4igqnZKtDiFH46Wpz0S9lK33X7o+WQ5t3I=; b=F2lrZuvi+V/dhM5e/UqpggMeH1xsk5JNDlyQJ8mBeN1eGUfg08balkarIk2r794OLP no/cr+1gmyBfY0T9ccecOp1uvzuqv9S6d0XRb2GnAQdVkfZfOriH2hawPY/lGZBuV1VS 2z8DgD5pHh1/552JAWvLTPHu74rTHG8kOzaxorzXXeqMVit7i46oVcBNHkFNjKBiBa8U AhaUGUrvBd+hKij+dLFOdes4AJCuBGN83LuuavnrwrrWfe2jhu4dB4KCVPEhSQ3GCybA 7BUWAmgxp0e9RjoV2CDb+/9BlOB9rZ5yfx4DUHBChzk2cAQps1LnGrfoz7SrpsANNB0/ L/Lw== X-Gm-Message-State: AOJu0YxsqDKVeE5ZZUkoE8E2H1IO1qdp2ZhA3wqSRBkj7q40InWnOnFv q0e2Uq5M0BNmRVbp66Y9HDzLgqXv7RHr7vlPzM0yJg== X-Google-Smtp-Source: AGHT+IENYqRAmUMZrbYVz/awelVrS98dN9EBSz3mhH7YNRPGnUlrE291lcyJX0lCb7iH77aTJib6w3sipSxW85oxGrY= X-Received: by 2002:a05:6122:2a54:b0:496:1f95:209a with SMTP id fx20-20020a0561222a5400b004961f95209amr4592110vkb.15.1697618290525; Wed, 18 Oct 2023 01:38:10 -0700 (PDT) MIME-Version: 1.0 References: <012a01d9f710$db84ef40$928ecdc0$@nextmovesoftware.com> <7648c11c-11c9-46e9-8e96-5536f87336cc@gmail.com> <00be01d9ff55$76c56010$64502030$@nextmovesoftware.com> In-Reply-To: From: Eric Gallager Date: Wed, 18 Oct 2023 04:37:59 -0400 Message-ID: Subject: Re: [PATCH] Support g++ 4.8 as a host compiler. To: Roger Sayle , Jeff Law , gcc-patches@gcc.gnu.org, Richard Biener , Jakub Jelinek , richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 Sun, Oct 15, 2023 at 7:43=E2=80=AFAM Richard Sandiford wrote: > > "Roger Sayle" writes: > > I'd like to ping my patch for restoring bootstrap using g++ 4.8.5 > > (the system compiler on RHEL 7 and later systems). > > https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632008.html > > > > Note the preprocessor #ifs can be removed; they are only there to docum= ent > > why the union u must have an explicit, empty (but not default) construc= tor. > > > > I completely agree with the various opinions that we might consider > > upgrading the minimum host compiler for many good reasons (Ada, > > D, newer C++ features etc.). It's inevitable that older compilers and > > systems can't be supported indefinitely. > > > > Having said that I don't think that this unintentional trivial breakage= , > > that has a safe one-line work around is sufficient cause (or non-neglib= le > > risk or support burden), to inconvenice a large number of GCC users > > (the impact/disruption to cfarm has already been mentioned). > > > > Interestingly, "scl enable devtoolset-XX" to use a newer host compiler, > > v10 or v11, results in a significant increase (100+) in unexpected fail= ures I see > > during mainline regression testing using "make -k check" (on RedHat 7.9= ). > > (Older) system compilers, despite their flaws, are selected for their > > (overall) stability and maturity. > > > > If another patch/change hits the compiler next week that reasonably > > means that 4.8.5 can no longer be supported, so be it, but its an > > annoying (and unnecessary?) inconvenience in the meantime. > > > > Perhaps we should file a Bugzilla PR indicating that the documentation > > and release notes need updating, if my fix isn't considered acceptable? > > > > Why this patch is an trigger issue (that requires significant discussio= n > > and deliberation) is somewhat of a mystery. > > It seemed like there was considerable support for bumping the minimum > to beyond 4.8. I think we should wait until a decision has been made > before adding more 4.8 workarounds. > > Having a conditional explicit constructor is dangerous because it changes > semantics. E.g. consider: > > #include > > union u { int x; }; > void f(u *ptr) { new(ptr) u; } > void g(u *ptr) { new(ptr) u(); } > > g(ptr) zeros ptr->x whereas f(ptr) doesn't. If we add "u() {}" then g() > does not zero ptr->x. > > So if we did add the workaround, it would need to be unconditional, > like you say. > > Thanks, > Richard I personally would prefer it if GCC would continue to maintain support for gcc 4.8 for a host compiler. One of the things I like about GCC is how it's generally tried to keep support for older host tools for longer than other projects do, meaning that with GCC, you don't get stuck on the upgrade treadmill of having to compile a whole string of consecutive compilers just to be able to compile the latest one like you have to do with clang. Please just apply Roger's patch; it already exists and is relatively simple.