ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I know with gcc you can suppress certain types of warnings by using -Wno-error-errorType to suppress errors of type "errorType". But how do you suppress one specific warning. Is there a way to do this with gcc - I understand you can do it with Visual C++ by using pragma then the unique warning id number. But in gcc i don't see unique warning numbers??
I'm not really sure, but why would you need to suppress a warning? It's just a warning, not an error, and later on the bug that the warning is trying to warn you about may sneak into the code elsewhere. If you've blocked that warning, you won't know it until difficult to track logic errors appear.
I understand you're concern. The requirement is to have warning free nightly builds and the warning is coming from a 3rd party package so being able to suppress it is desireable. Can anyone give an example of how to use gcc pragmas?
Googling around, it seems that gcc doesn't like the pragma. If there's a way to do this with a pragma, they aren't telling. :-) All the sources I can find say to do it with the -Wno-something flags on the compile command. What warning is being given? Can it be covered with a -Wno flag?
I agree it seems they had it long ago, then decided it was bad, and now are somewhat making it more available with gcc 3.4.0. No, the -Wno-error doesn't cover it because then it'll supress all warnings of that type not just the ones for that particular class (i think..).
Hrm, that may be the compromise you have to live with. Alternatively, you could just wrap gcc in a little awk script that just strips that warning out. After all, a warning is really nothing more than a line on the screen.