[MacPorts] #59931: pstoedit @3.75 does not build on PPC Tiger, Mac OS X 10.4.11, because 'body of constexpr function 'constexpr float rnd(float, float)' not a return-statement'

MacPorts noreply at macports.org
Wed Jan 8 12:33:28 UTC 2020


#59931: pstoedit @3.75 does not build on PPC Tiger, Mac OS X 10.4.11, because 'body
of constexpr function 'constexpr float rnd(float, float)' not a return-
statement'
-----------------------+----------------------
 Reporter:  ballapete  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.6.2
 Keywords:  tiger      |       Port:  pstoedit
-----------------------+----------------------
 {{{
 libtool: compile:  /opt/local/bin/g++-mp-7 -DHAVE_CONFIG_H -I.
 -DHAVE_LIBPLOTTER -DHAVE_MKSTEMP -DHAVE_MAGIC -DMAGICKCORE_HDRI_ENABLE=0
 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0
 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0
 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
 -DHAVE_LIBZIP -DDEFAULTGS=gs
 -DPSTOEDITDATADIR=\"/opt/local/share/pstoedit\"
 -DPSTOEDITLIBDIR=\"/opt/local/lib/pstoedit\" -Wall -Wextra -Wuninitialized
 -Wswitch-default -Wunused -Wshadow -Wwrite-strings -Wcast-qual -Wpointer-
 arith -Wno-long-long -I/opt/local/include -Wno-long-long -D_BIG_ENDIAN
 -pipe -Os -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -DINTERNALBOOL
 -MT drvpdf.lo -MD -MP -MF .deps/drvpdf.Tpo -c drvpdf.cpp  -fno-common
 -DPIC -o .libs/drvpdf.o
 drvpdf.cpp: In function 'constexpr float rnd(float, float)':
 drvpdf.cpp:49:1: error: body of constexpr function 'constexpr float
 rnd(float, float)' not a return-statement
  }
  ^
 make[2]: *** [drvpdf.lo] Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_graphics_pstoedit/pstoedit/work/pstoedit-3.75/src'
 }}}

 The source code is:

 {{{
    44   static constexpr float rnd(const float f, const float roundnumber)
    45   {
    46           const float roundup = (f < 0.0f) ? -0.5f : 0.5f;
    47           return ((long int) ((f * roundnumber) + roundup)) /
 roundnumber;
    48
    49   }
    50
    51   static inline float RND3(const float f)
    52   {
    53           return rnd(f, 1000.0f);
    54   }
 }}}

 Should the `return` statement better be:

 {{{
    47           return (((long int) ((f * roundnumber) + roundup)) /
 roundnumber);
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/59931>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list