From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23915 invoked by alias); 11 Jan 2006 15:22:46 -0000 Received: (qmail 23903 invoked by uid 48); 11 Jan 2006 15:22:44 -0000 Date: Wed, 11 Jan 2006 15:22:00 -0000 Subject: [Bug c++/25751] New: Poor error when templating on undefined types X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "chris at bubblescope dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-01/txt/msg01084.txt.bz2 List-Id: #include int main(void) { std::vector v; v.begin(); } Produces: temp.cc: In function 'int main()': temp.cc:5: error: 'foo' was not declared in this scope temp.cc:5: error: template argument 1 is invalid temp.cc:5: error: template argument 2 is invalid temp.cc:5: error: invalid type in declaration before ';' token temp.cc:6: error: request for member 'begin' in 'v', which is of non-class type 'int' That last warning doesn't seem to make any sense. Perhaps g++ should abandon parsing / producing errors earlier? -- Summary: Poor error when templating on undefined types Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chris at bubblescope dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25751