From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27810 invoked by alias); 3 Jun 2010 11:25:06 -0000 Received: (qmail 27630 invoked by uid 48); 3 Jun 2010 11:24:42 -0000 Date: Thu, 03 Jun 2010 11:25:00 -0000 Message-ID: <20100603112442.27629.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/2972] -Wuninitialized could warn about uninitialized member variable usage in constructors In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jwakely dot gcc at gmail dot com" 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: 2010-06/txt/msg00309.txt.bz2 ------- Comment #14 from jwakely dot gcc at gmail dot com 2010-06-03 11:24 ------- Created an attachment (id=20817) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20817&action=view) better -Wmeminit patch This version ignores empty classes and checks for a nontrivial default ctor instead of layout_pod_type. This patch doesn't enable the warning unless explicity requested. I realise that this warning is about enforcing style ("members should be initialised in the mem-initializer-list not in the ctor body") but that's ok because it's my preferred style, I just don't want the compiler to enforce other people's preferred style ;) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2972