From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28289 invoked by alias); 30 Dec 2009 01:43:46 -0000 Received: (qmail 28240 invoked by uid 48); 30 Dec 2009 01:43:36 -0000 Date: Wed, 30 Dec 2009 01:43:00 -0000 Message-ID: <20091230014336.28239.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/31878] Spurious warnings with -Wreturn-type due to not performing CCP/VRP in the front-end In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" 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 X-SW-Source: 2009-12/txt/msg02749.txt.bz2 ------- Comment #9 from manu at gcc dot gnu dot org 2009-12-30 01:43 ------- (In reply to comment #8) So the answer is that Clang also warns. I was wondering whether the minimal ccp propagation that Clang does in the front-end would catch this. I guess the answer is no. As for GCC, the general wisdom is to not move more warnings to the middle-end unless really awful false positives/negatives, and to not perform any expensive optimizations at -O0. So unless someone comes up with a more convincing testcase, or an inexpensive way to detect this at -O0, this won't be fixed. Closing then, we have far enough real bugs to worry about. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31878