Browse Source

* More robust definition of CL_HAVE_ATTRIBUTE_FLATTEN.

master
Richard Kreckel 17 years ago
parent
commit
7c57b746de
  1. 5
      ChangeLog
  2. 10
      m4/cc.m4
  3. 2
      src/base/cl_maybe_inline.h

5
ChangeLog

@ -1,3 +1,8 @@
2007-02-15 Richard B. Kreckel <kreckel@ginac.de>
* m4/cc.m4 (CL_HAVE_ATTRIBUTE_FLATTEN): More robust definition allows...
* src/base/cl_maybe_inline.h (CL_FLATTEN): ...simplification here.
2007-02-10 Richard B. Kreckel <kreckel@ginac.de> 2007-02-10 Richard B. Kreckel <kreckel@ginac.de>
* autoconf/ltmain.sh: Update to libtool-1.5.26. * autoconf/ltmain.sh: Update to libtool-1.5.26.

10
m4/cc.m4

@ -76,11 +76,15 @@ AC_CACHE_CHECK([whether the compiler supports __attribute__((flatten))], cl_cv_h
cat > conftest.cc <<EOF cat > conftest.cc <<EOF
void f() __attribute__((flatten)); void f() __attribute__((flatten));
EOF EOF
AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -c conftest.cc >/dev/null 2>conftest.out)
if grep -i "warning" conftest.out > /dev/null; then
if AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -c conftest.cc >/dev/null 2>conftest.stderr)
then
if grep -i "warning" conftest.stderr > /dev/null; then
cl_cv_have_attr_flatten=no cl_cv_have_attr_flatten=no
else
else
cl_cv_have_attr_flatten=yes cl_cv_have_attr_flatten=yes
fi
else
cl_cv_have_attr_flatten=no
fi fi
rm -f conftest* rm -f conftest*
]) ])

2
src/base/cl_maybe_inline.h

@ -102,7 +102,7 @@
* a function. * a function.
* 2. It's ignored if the optimization is switched off. * 2. It's ignored if the optimization is switched off.
*/ */
#if defined(__GNUC__) && defined(CL_HAVE_ATTRIBUTE_FLATTEN)
#if defined(CL_HAVE_ATTRIBUTE_FLATTEN)
#define CL_FLATTEN __attribute__((flatten)) #define CL_FLATTEN __attribute__((flatten))
#else #else
#define CL_FLATTEN #define CL_FLATTEN

Loading…
Cancel
Save