- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compiling aCC code using CC
Operating System - HP-UX
1819899
Members
2456
Online
109607
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
Discussions
Forums
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
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
тАО11-21-2002 08:46 PM
тАО11-21-2002 08:46 PM
Compiling aCC code using CC
Hi,
As a part of aCC compiler migration, the code which we had were made aCC compliant. The same code we use in Solaris and we have to compile the code using CC. So the task of compiling an aCC code with CC. Eventhough the scenario mentioned here is that for Solaris, the whole idea is to compile the aCC code using CC and fool the compiler
Now the question.
1. Do we have an aCC compiler for Sun ? Is it a freeware ?
2. I thought of resolving the issue using some ifdef statements. e.g.
#ifdef __aCC
#include
#else
// Want help here. Want a wrapper for nothrow which
// will do nothing. Basically, the question is how to fool
// the compiler when it gets this statement ->
// int *i = new (nothrow) int[20];
#endif
If any one of you did something similar, can you please let me know
Thanks and Regard
Vishal
As a part of aCC compiler migration, the code which we had were made aCC compliant. The same code we use in Solaris and we have to compile the code using CC. So the task of compiling an aCC code with CC. Eventhough the scenario mentioned here is that for Solaris, the whole idea is to compile the aCC code using CC and fool the compiler
Now the question.
1. Do we have an aCC compiler for Sun ? Is it a freeware ?
2. I thought of resolving the issue using some ifdef statements. e.g.
#ifdef __aCC
#include
#else
// Want help here. Want a wrapper for nothrow which
// will do nothing. Basically, the question is how to fool
// the compiler when it gets this statement ->
// int *i = new (nothrow) int[20];
#endif
If any one of you did something similar, can you please let me know
Thanks and Regard
Vishal
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2002 02:41 AM
тАО11-22-2002 02:41 AM
Re: Compiling aCC code using CC
Found out the way !!!!
Here it goes
---------------------------------------
#if defined(__YOUR_DEF) || defined(__sun)
const int nothrow = 0;
void * operator new(size_t _v_size, const int _v_dummy) throw() {
return (void *)(new char [size]);
}
#else
#include
#endif
---------------------------------------
Now you can
$ CC -D__YOUR_DEF file.cc
or in Solaris
$ CC file.cc
Thanks and Regards
Vishal
Here it goes
---------------------------------------
#if defined(__YOUR_DEF) || defined(__sun)
const int nothrow = 0;
void * operator new(size_t _v_size, const int _v_dummy) throw() {
return (void *)(new char [size]);
}
#else
#include
#endif
---------------------------------------
Now you can
$ CC -D__YOUR_DEF file.cc
or in Solaris
$ CC file.cc
Thanks and Regards
Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2002 05:16 AM
тАО11-22-2002 05:16 AM
Re: Compiling aCC code using CC
Even
#define nothrow
will work in some compilers ;o)
Vishal
#define nothrow
will work in some compilers ;o)
Vishal
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.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP