From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14928 invoked by alias); 31 Jul 2008 15:33:21 -0000 Received: (qmail 14920 invoked by uid 22791); 31 Jul 2008 15:33:21 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Jul 2008 15:32:44 +0000 Received: from localhost.localdomain ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1KOa8v-0006MY-Dc; Thu, 31 Jul 2008 15:32:41 +0000 Message-ID: <4891DB18.AD6D0BA9@dessent.net> Date: Thu, 31 Jul 2008 17:07:00 -0000 From: Brian Dessent Reply-To: GCC-help X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Kastil CC: GCC-help Subject: Re: Description warnings References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg00329.txt.bz2 Kastil wrote: > I was hoping for something which will describe these warnings. Most diagnostics have a command line switch that can be used to enable or disable them, and each is documented in the manual: Note that this node only documents generic options, there are also language-specific options: If you're using a recent version of gcc (>= 4.2.x I believe) you can use -fdiagnostics-show-option to have the compiler tell you the name of the -Wfoo option corresponding to each diagnostic it prints -- for those that are controllable by an option. > Some think > that will tell me what I have done wrong in my program and why gcc > produced this warning. But that is a very different prospect. It's one thing to document in general terms the intent behind a given diagnostic, but it's a very different thing to apply that to a specific instance of a warning in a specific piece of code. There is no way that any document is ever going to be able to tell you with specificity what each message means in the context of your code. That requires knowledge of your code, knowledge of the relevant ISO language standards, and knowledge of the compiler. > Now when gcc writes me some warning I spend a lot of time trying to figure > out, what I have done wrong (or what could be done better). I am looking Try the relevant C and C++ FAQs: Brian