From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19188 invoked by alias); 6 Mar 2002 02:30:27 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19125 invoked by uid 61); 6 Mar 2002 02:30:23 -0000 Date: Tue, 05 Mar 2002 18:30:00 -0000 Message-ID: <20020306023023.19124.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, stanisls@ifi.uio.no From: rodrigc@gcc.gnu.org Reply-To: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, stanisls@ifi.uio.no, gcc-gnats@gcc.gnu.org X-Mailer: gnatsweb 2.9.3 Subject: Re: c++/5843: An error in one of the g++ template files. X-SW-Source: 2002-03/txt/msg00182.txt.bz2 List-Id: Synopsis: An error in one of the g++ template files. State-Changed-From-To: open->feedback State-Changed-By: rodrigc State-Changed-When: Tue Mar 5 18:30:22 2002 State-Changed-Why: The code is compiling because of: template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { size_type __size = this->size(); if (__n <= __size) { __pos = std::(((__size - __n) < (__pos)) ? (__size - __n) : (__pos)); This code really should be: template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { size_type __size = this->size(); if (__n <= __size) { __pos = std::min(__size - __n ,__pos); In the source code for your program, are you defining a preprocessor min macro? Can you undefine it, and see if that helps? http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5843