From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 333 invoked by alias); 4 Dec 2007 20:38:10 -0000 Received: (qmail 32722 invoked by uid 48); 4 Dec 2007 20:37:57 -0000 Date: Tue, 04 Dec 2007 20:38:00 -0000 Message-ID: <20071204203757.32721.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/34307] when data member name is same as parameter name, possible to omit parameter name in constructor without warning In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "myselfhimself at free dot fr" 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: 2007-12/txt/msg00311.txt.bz2 ------- Comment #2 from myselfhimself at free dot fr 2007-12-04 20:37 ------- Hi this is to say that my first example was not a problem so sorry for posting. a conclusion is that c++ tolerates nameless parameter names even in function definition. As to the second example, Andrew Pinski, you state that the parameter msg, which is passed to the string constructor of msg, in the member initialization list. I agree with this, but now given the following class definition: #include #include using namespace std; class Something { public: string msg; Something():msg(msg) {} void sayMsg() { cout << "sayMsg() yo here's my message "<< msg << "-done"<