- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: aCC Compiler. can i ignore some warning codes?
Operating System - HP-UX
1752727
Members
5698
Online
108789
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
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-26-2008 07:06 AM
тАО11-26-2008 07:06 AM
aCC Compiler. can i ignore some warning codes?
Hi people!
Machine: HP-UX B.11.23 U ia64
aCC: HP C/aC++ B3910B A.06.20 [May 13 2008]
I'm compiling old source code... It has some horrible things...
Well, sometimes those programs has something like this:
------------------------------------------------------------------------------------------
int function()
{
/* Previous code, not important */
for(;;) /* A FOREVER loop */
{
/* anything */
if (/*anything*/)
break;
if (/*anything*/)
continue;
}
return 0;
}
------------------------------------------------------------------------------------------
Well, it's horrible, but it works. I can't change it (well, i don't want to change all those FOREVER loops).
When i compile those sources, aCC tells me:
------------------------------------------------------------------------------------------
Warning 2111-D: statement is unreachable
return 0;
------------------------------------------------------------------------------------------
I guess that the compiler detects the FOREVER loop and thinks it never ends.
My question is:
Is there anyway to ignore this Warning code?
Well, i could send compiler results to a text file, and then filter the text file ignoring the lines with this code... but i prefer, if possible, to omit this code (only this code).
Thanks in advance!!
Machine: HP-UX B.11.23 U ia64
aCC: HP C/aC++ B3910B A.06.20 [May 13 2008]
I'm compiling old source code... It has some horrible things...
Well, sometimes those programs has something like this:
------------------------------------------------------------------------------------------
int function()
{
/* Previous code, not important */
for(;;) /* A FOREVER loop */
{
/* anything */
if (/*anything*/)
break;
if (/*anything*/)
continue;
}
return 0;
}
------------------------------------------------------------------------------------------
Well, it's horrible, but it works. I can't change it (well, i don't want to change all those FOREVER loops).
When i compile those sources, aCC tells me:
------------------------------------------------------------------------------------------
Warning 2111-D: statement is unreachable
return 0;
------------------------------------------------------------------------------------------
I guess that the compiler detects the FOREVER loop and thinks it never ends.
My question is:
Is there anyway to ignore this Warning code?
Well, i could send compiler results to a text file, and then filter the text file ignoring the lines with this code... but i prefer, if possible, to omit this code (only this code).
Thanks in advance!!
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2008 07:23 AM
тАО11-26-2008 07:23 AM
Re: aCC Compiler. can i ignore some warning codes?
Ooops!!!
Forget this thread!!
It's too easy: "aCC +W2111 source.c"
Thanks!!
Forget this thread!!
It's too easy: "aCC +W2111 source.c"
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2008 07:35 AM
тАО11-26-2008 07:35 AM
Re: aCC Compiler. can i ignore some warning codes?
Thread closed!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2008 12:40 PM
тАО11-26-2008 12:40 PM
Re: aCC Compiler. can i ignore some warning codes?
>Warning 2111-D: statement is unreachable
The compiler seems broken if the presence of the "if (...) break" doesn't suppress the warning.
The compiler seems broken if the presence of the "if (...) break" doesn't suppress the warning.
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