From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14375 invoked by alias); 16 Nov 2009 16:59:27 -0000 Received: (qmail 13940 invoked by uid 48); 16 Nov 2009 16:59:12 -0000 Date: Mon, 16 Nov 2009 16:59:00 -0000 Subject: [Bug c++/42067] New: Misleading error message for misusing a type X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jlquinn at optonline dot net" 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-11/txt/msg01315.txt.bz2 The following small test drove me crazy and had me convinced that gcc 4.4 had regressed. I had the C++ spec out too trying to understand exactly how string is declared until I eventually saw the actual problem, which is that the first parameter is named 'string'. I'm not sure exactly how to improve the error message here. 4.3 and earlier accept this code. #include using std::string; int fn(string& string, string& head); g++-4.4 -c junk.C junk.C:3: error: ‘string’ is not a type -- Summary: Misleading error message for misusing a type Product: gcc Version: 4.4.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jlquinn at optonline dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42067