- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem compiling with -AA option, aCC A.03.56
Operating System - HP-UX
1753396
Members
7579
Online
108792
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 02:10 AM
10-25-2004 02:10 AM
Problem compiling with -AA option, aCC A.03.56
Somehow we have problems compiling even the simplest programs with -AA option. For example, I am trying to compile the file:
<--------- cmath_test.cpp ---------
#include
int main(int argc, char *argv[])
{
return 0;
}
--------- cmath_test.cpp --------->
$ /opt/aCC.356/bin/aCC -AA cmath_test.cpp
Error 328: "/opt/aCC.356/include_std/cmath", line 43 # Function 'fabs' has not been defined yet; cannot call.
inline double abs(double d) { return fabs(d); }
^^^^
...
Well, I used -E and -P options to find out why the errors happen. I found that all the functions in the math.h header ended up declared in std::std (double std) namespace. Then I looked at the cmath and math.h files.
<--------- cmath, lines 17 thru 27 ---------
#if !defined(RWSTD_NO_NAMESPACE) && !defined(_NAMESPACE_STD)
#include // indirectly picks up for
#include
#include
#define _NAMESPACE_STD
namespace std {
#include
} // namespace std
#undef _NAMESPACE_STD
--------- cmath, lines 17 thru 27 --------->
<--------- math.h, lines 32 thru 36 ---------
#ifdef _NAMESPACE_STD
namespace std {
#endif
extern double acos(double);
extern double asin(double);
--------- math.h, lines 32 thru 36 --------->
cmath opens namespace std the first time, defines the macro _NAMESPACE_STD, includes math.h, then math.h opens namespace std the second time when the macro _NAMESPACE_STD is defined.
We use the aCC A.03.56 compiler, HP-UX B.11.11 U 9000/800.
$ cksum /opt/aCC.356/include_std/cmath
2144126240 4822 /opt/aCC.356/include_std/cmath
$ cksum /usr/include/math.h
2126400671 22688 /usr/include/math.h
Please help. I will provide more information if necessary.
Thanks,
Anatoly.
<--------- cmath_test.cpp ---------
#include
int main(int argc, char *argv[])
{
return 0;
}
--------- cmath_test.cpp --------->
$ /opt/aCC.356/bin/aCC -AA cmath_test.cpp
Error 328: "/opt/aCC.356/include_std/cmath", line 43 # Function 'fabs' has not been defined yet; cannot call.
inline double abs(double d) { return fabs(d); }
^^^^
...
Well, I used -E and -P options to find out why the errors happen. I found that all the functions in the math.h header ended up declared in std::std (double std) namespace. Then I looked at the cmath and math.h files.
<--------- cmath, lines 17 thru 27 ---------
#if !defined(RWSTD_NO_NAMESPACE) && !defined(_NAMESPACE_STD)
#include
#include
#include
#define _NAMESPACE_STD
namespace std {
#include
} // namespace std
#undef _NAMESPACE_STD
--------- cmath, lines 17 thru 27 --------->
<--------- math.h, lines 32 thru 36 ---------
#ifdef _NAMESPACE_STD
namespace std {
#endif
extern double acos(double);
extern double asin(double);
--------- math.h, lines 32 thru 36 --------->
cmath opens namespace std the first time, defines the macro _NAMESPACE_STD, includes math.h, then math.h opens namespace std the second time when the macro _NAMESPACE_STD is defined.
We use the aCC A.03.56 compiler, HP-UX B.11.11 U 9000/800.
$ cksum /opt/aCC.356/include_std/cmath
2144126240 4822 /opt/aCC.356/include_std/cmath
$ cksum /usr/include/math.h
2126400671 22688 /usr/include/math.h
Please help. I will provide more information if necessary.
Thanks,
Anatoly.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2004 03:03 AM
12-23-2004 03:03 AM
Re: Problem compiling with -AA option, aCC A.03.56
What happens if you try and compile
#include
using namespace std;
int main(int argc, char *argv[])
{
return 0;
}
#include
using namespace std;
int main(int argc, char *argv[])
{
return 0;
}
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP