public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] fix frange_nextafter odr violation
@ 2023-06-08 12:28 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-06-08 12:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:66378d5d888aa625f73316c6189684aad4bd3022

commit 66378d5d888aa625f73316c6189684aad4bd3022
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Jun 8 09:17:46 2023 -0300

    fix frange_nextafter odr violation
    
    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.
    
    
    for  gcc/ChangeLog
    
            * range-op-float.cc (frange_nextafter): Drop inline.
            (frelop_early_resolve): Add static.
            (frange_float): Likewise.

Diff:
---
 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 a99a6b01ed8..d6da2aa701e 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 = float_type_node)
 {
   REAL_VALUE_TYPE min, max;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] fix frange_nextafter odr violation
@ 2023-06-09  8:08 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-06-09  8:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:37d63f69507b9c6384ca74b465f17410b6c85fd0

commit 37d63f69507b9c6384ca74b465f17410b6c85fd0
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jun 9 02:42:21 2023 -0300

    fix frange_nextafter odr violation
    
    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.
    
    
    for  gcc/ChangeLog
    
            * range-op-float.cc (frange_nextafter): Drop inline.
            (frelop_early_resolve): Add static.
            (frange_float): Likewise.

Diff:
---
 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 e0e91bad44d..22cf74b9d4a 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 = float_type_node)
 {
   REAL_VALUE_TYPE min, max;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] fix frange_nextafter odr violation
@ 2023-06-09  6:26 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-06-09  6:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:96171ede02a6d23cf49da5431881894df56e3492

commit 96171ede02a6d23cf49da5431881894df56e3492
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jun 9 02:42:21 2023 -0300

    fix frange_nextafter odr violation
    
    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.
    
    
    for  gcc/ChangeLog
    
            * range-op-float.cc (frange_nextafter): Drop inline.
            (frelop_early_resolve): Add static.
            (frange_float): Likewise.

Diff:
---
 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 e0e91bad44d..22cf74b9d4a 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 = float_type_node)
 {
   REAL_VALUE_TYPE min, max;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] fix frange_nextafter odr violation
@ 2023-06-09  6:18 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-06-09  6:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ba8a5d58396f57640d7a20daaef978a2dfe1b3e4

commit ba8a5d58396f57640d7a20daaef978a2dfe1b3e4
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jun 9 02:42:21 2023 -0300

    fix frange_nextafter odr violation
    
    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.
    
    
    for  gcc/ChangeLog
    
            * range-op-float.cc (frange_nextafter): Drop inline.
            (frelop_early_resolve): Add static.
            (frange_float): Likewise.

Diff:
---
 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 e0e91bad44d..22cf74b9d4a 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 = float_type_node)
 {
   REAL_VALUE_TYPE min, max;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-09  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 12:28 [gcc(refs/users/aoliva/heads/testme)] fix frange_nextafter odr violation Alexandre Oliva
2023-06-09  6:18 Alexandre Oliva
2023-06-09  6:26 Alexandre Oliva
2023-06-09  8:08 Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).