This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/22083] [3.4/4.0/4.1 Regression] TARGET_C99_FUNCTIONS is wrongly defined on AIX 5.1
- From: "lmakhlis at bmc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2005 19:01:35 -0000
- Subject: [Bug target/22083] [3.4/4.0/4.1 Regression] TARGET_C99_FUNCTIONS is wrongly defined on AIX 5.1
- References: <20050615205609.22083.lmakhlis@bmc.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From lmakhlis at bmc dot com 2005-06-17 19:01 -------
It might be an issue with the patch level of libm -- I was testing on 5.1 ML04,
which was released in 2002 -- but I've found another machine at ML05 (released
in Oct 2003), and it still doesn't have sqrtf and friends in libm. I don't have
access to anything newer than that right now.
I doubt it's related to Visual Age. VAC's implementation of the standard C++
library, /usr/lib/libC.a, does have sqrtf and friends -- but I'm not linking
with it when using GCC.
Before submitting the bug report, I tried removing the macro definition in
aix51.h, and it does solve the problem. There is a related C++-specific problem
that still isn't solved, but maybe that merits a separate PR. The problem is:
If you have C++ code that uses std::sqrt(float) and build a dynamically linked
executable on AIX 5.1, then bring it over to AIX 5.2, it won't run, because
sqrtf() is now in libm, but not in libstdc++. This doesn't seem to be a problem
on other platforms (for example, a program compiled on Solaris 8, against
sqrtf() in libstdc++, runs fine on Solaris 10, with sqrtf() in libm), but on AIX
the dynamic loader looks for a symbol only in a specific library. I am guessing
it's a difference between COFF and ELF?
As a side point, TARGET_C99_FUNCTION isn't defined on any Solaris platforms. I
think it's okay to define it on Solaris 9 and up?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22083