From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8847 invoked by alias); 17 Feb 2014 09:07:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8794 invoked by uid 48); 17 Feb 2014 09:07:38 -0000 From: "chengniansun at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/13029] [3.4 Regression] static consts and -Wunused-variable Date: Mon, 17 Feb 2014 09:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 3.4.0 X-Bugzilla-Keywords: diagnostic, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: chengniansun at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 3.4.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg01637.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13029 --- Comment #7 from Chengnian Sun --- Thanks, Jakub and Mikael. I see it now. IMHO, it might be worthy to add a flag -Wunused-const-variable similar to Clang, which is not included either -Wall or -Wextra. Therefore the end user can decide whether to enable this warning based on their specific scenario. I think it is better than the current case that people who need this warning support cannot get it.