- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Which option can initialize variable in aCC co...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
тАО09-04-2008 11:38 PM
тАО09-04-2008 11:38 PM
Which option can initialize veriable in aCC comppiler 6.15?
I checked compiler documents, no any information about this, how can I know which option can initialize varibles?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 11:39 PM
тАО09-04-2008 11:39 PM
Re: Which option can initialize veriable in aCC comppiler 6.15?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2008 01:49 AM - edited тАО10-01-2011 07:18 PM
тАО09-05-2008 01:49 AM - edited тАО10-01-2011 07:18 PM
Re: Which option can initialize variable in aCC compiler A.06.15?
You must initialize your variables by initialization or assignment expressions or by default constructors.
If you get these warnings:
warning 20035: variable "%s" is used before its value is set
warning 2549: variable "%s" is used before its value is set
The optimizer may set the register to 0 to prevent worse problems.
The optimizer may set more registers to 0 if you use +Oinitcheck.
warning 20037: variable "%s" may be used before its value is set
In any case, you should NOT depend on this. Instead you should initialize the variables mentioned in the warnings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2008 02:01 AM
тАО09-05-2008 02:01 AM
Re: Which option can initialize veriable in aCC comppiler 6.15?
Because I need to port very old source from 11.0 to 11i v3.
The problem is all local varibles are initialized in old OS, but in new OS no any varible is initialized, it is impossible to add initialization code for all sources.
This is why I hope there is a option for initialization automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2008 02:09 AM - edited тАО10-01-2011 07:17 PM
тАО09-05-2008 02:09 AM - edited тАО10-01-2011 07:17 PM
Re: Which option can initialize variable in aCC compiler A.06.15?
>Do you mean there is no option that can automatically initialize local variables?
That's correct.
>The problem is all local variables are initialized in old OS, but in new OS no variable is initialized
What OS and hardware were you using before?
>it is impossible to add initialization code for all sources.
Well you can make these warnings into errors so you have to initialize them:
+We20035,2549,20037
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2008 04:31 AM - edited тАО10-01-2011 07:19 PM
тАО09-06-2008 04:31 AM - edited тАО10-01-2011 07:19 PM
Re: Which option can initialize variable in aCC compiler A.06.15?
>port very old source from 11.00 to 11i v3.
Neither this compiler nor the OS would zero out local variables. Why do you think you have more of a problem on your IPF port?
(The PA32 dld may have zeroed out some initial portion of the stack but not everything.)