From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 1B3463856964 for ; Fri, 9 Jun 2023 09:03:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B3463856964 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b1b1635661so16526371fa.0 for ; Fri, 09 Jun 2023 02:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686301436; x=1688893436; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cqmgChKWI9XPns/LDIxuTpcdXfWP8EWN+mlflyVvO3Q=; b=C327uMLJODtnG39+Y1hKnXKykh30WeGyeniigFPL738mbhoSKxKKv6BvGN2zTnAz2W n2Nn5cRqAnAvD6AgNd0QstBmFgGOFeuSafN+omtmWjsg8NRtFqLkziJP2emFnOUOs10Q oGyBVO163GnOA1G8JcrnsG0i8Bg0sExgcTQ8yzfzZOizE9RaUDGO8X3WczEwvewbR7QX 6E9SG/YA/5AhivCdV3yLmqizS+Ljb46bxrxlzHmXIVzMk23JLqEsVoAT55eTvcQfjuD9 LUUUPzibSZ+iexHD+tyiEMm3HfYkNEj1T1J2+sEce3IgmWJ0Yq8k6i8eU7DSYJvRdaRA /I6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686301436; x=1688893436; h=content-transfer-encoding:cc: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=cqmgChKWI9XPns/LDIxuTpcdXfWP8EWN+mlflyVvO3Q=; b=A9/fps0PTfdqJfdcIanxAdLpuXW9ZNAsoInFM6v5I4EDh5y3+ouMh8po5E5Ak8FRVx McTJxwEWLXk0qmnc+ikz6nT18AFmZp5SSQrynR4fKXP8gBB6rEf3q7yxQtwW1+jyYln3 RoENqB0EFyFaUe4UrpIOLICQShAFGlIzfo/HEFyTkCFdEdMtRzG/S+gmAU7N9OPYWfSe OlePyo8YXjgmACBqbc8rsdZMLLctl2xj211EG3uFmb5kCpbulDWuh/CudKL+kZ9Ylo+3 b29WyxBIjfs0gip6qUm0ygeYRGCrAVKVH//pQVIx+2QEMEtf7e/fY+PqR6v4IfGIZw9d 7PJw== X-Gm-Message-State: AC+VfDwRYWUZl0DQ2NKSjS+dGyopWx3DfmnkZ0PJ94kH0n3YXHWsfbf0 m30bz+ni5PU0c77ZDJ10zSYxa87in2Megx7zzGu/cpWy X-Google-Smtp-Source: ACHHUZ6/lFbyym6Qh85GMk3llQKvHJUoVfxv9J+5oliiQ2Ee6FGFysSVqIcbwjy5RbUZGpZAUWIpvNCCubktY7RfkXA= X-Received: by 2002:a2e:9859:0:b0:2af:23fe:98ef with SMTP id e25-20020a2e9859000000b002af23fe98efmr504238ljj.50.1686301436411; Fri, 09 Jun 2023 02:03:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 9 Jun 2023 11:03:42 +0200 Message-ID: Subject: Re: [PATCH] fix frange_nextafter odr violation To: Alexandre Oliva Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Thu, Jun 8, 2023 at 4:38=E2=80=AFPM Alexandre Oliva via Gcc-patches wrote: > > > C++ requires inline functions to be declared inline and defined in > every translation unit that uses them. frange_nextafter is used in > gimple-range-op.cc but it's only defined as inline in > range-op-float.cc. Drop the extraneous inline specifier. > > Other non-static inline functions in range-op-float.cc are not > referenced elsewhere, so I'm making them static. > > Bootstrapping on x86_64-linux-gnu, along with other changes that exposed > the problem; it's already into stage3, and it wouldn't get past stage2 > before. Ok to install? OK > > for gcc/ChangeLog > > * range-op-float.cc (frange_nextafter): Drop inline. > (frelop_early_resolve): Add static. > (frange_float): Likewise. > --- > gcc/range-op-float.cc | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc > index a99a6b01ed835..d6da2aa701ee3 100644 > --- a/gcc/range-op-float.cc > +++ b/gcc/range-op-float.cc > @@ -255,7 +255,7 @@ maybe_isnan (const frange &op1, const frange &op2) > // Floating version of relop_early_resolve that takes into account NAN > // and -ffinite-math-only. > > -inline bool > +static inline bool > frelop_early_resolve (irange &r, tree type, > const frange &op1, const frange &op2, > relation_trio rel, relation_kind my_rel) > @@ -272,7 +272,7 @@ frelop_early_resolve (irange &r, tree type, > > // Set VALUE to its next real value, or INF if the operation overflows. > > -inline void > +void > frange_nextafter (enum machine_mode mode, > REAL_VALUE_TYPE &value, > const REAL_VALUE_TYPE &inf) > @@ -2878,7 +2878,7 @@ namespace selftest > > // Build an frange from string endpoints. > > -inline frange > +static inline frange > frange_float (const char *lb, const char *ub, tree type =3D float_type_n= ode) > { > REAL_VALUE_TYPE min, max; > > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about