From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27591 invoked by alias); 28 Jul 2005 04:54:54 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 27575 invoked by uid 22791); 28 Jul 2005 04:54:51 -0000 Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.206) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 28 Jul 2005 04:54:51 +0000 Received: by wproxy.gmail.com with SMTP id i30so333335wra for ; Wed, 27 Jul 2005 21:54:50 -0700 (PDT) Received: by 10.54.18.58 with SMTP id 58mr669586wrr; Wed, 27 Jul 2005 21:54:50 -0700 (PDT) Received: by 10.54.72.9 with HTTP; Wed, 27 Jul 2005 21:54:50 -0700 (PDT) Message-ID: <2e393d08050727215414182be6@mail.gmail.com> Date: Thu, 28 Jul 2005 04:54:00 -0000 From: corey taylor Reply-To: corey taylor To: Ming-Xiang Fu Subject: Re: 3.4.4 vs 3.2.5 ; fabs: cant use as a function.. Cc: gcc-help@gcc.gnu.org In-Reply-To: <20050728041558.M68708@cmlab.csie.ntu.edu.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050728041558.M68708@cmlab.csie.ntu.edu.tw> X-SW-Source: 2005-07/txt/msg00309.txt.bz2 Hi Fu, The code you attached doesn't show an include of cmath, but I assume that you did try it. What happens when you explicitly call std::fabs ? corey On 7/27/05, Ming-Xiang Fu wrote: >=20 >=20 > hi, I am having some problem to compile a code by gcc 3.4.4 which is > successfully compiled in gcc 3.2.5. >=20 >=20 > At the begining, it complains about abs(float) is ambiguous..and sin(), c= os() > not declares. >=20 > And then, I include , resolve some problem, and new problem occurs. >=20 > " ` fabs' cannot be used as a function " >=20 >=20 >=20 > please give me some guide, I will be appreciate about that. > Thanks anyway. :) >=20 >=20 > = RedMo > part of src code as below. >=20 > -------------------------------------------------------------------------= ----------------------------------------------------------- >=20 > // GlobalObject.cpp: implementation of the CGlobalObject class. > // > ////////////////////////////////////////////////////////////////////// >=20 > #include "GlobalObject.h" > #include > #include > #include "../../Node/DEBUG.H" >=20 > using namespace std; >=20 > void VsMathObject::Evaluate(int member, VsValue& value, VsExprList &args, > VsFunctionCall *parent) > { >=20 > switch(member) > { >=20 > case fabs: > value.SetNumber( fabs(arg0.GetNumber()) ); > // arg0.GetNumber() returns a float number. > break; > case ffabs: > value.SetNumber( fabs(arg0.GetNumber()) ); > break; > case facos: > value.SetNumber( acos(arg0.GetNumber()) ); > break; > case fasin: > value.SetNumber( asin(arg0.GetNumber()) ); > break; >=20 > default: > ASSERT(false); > } > } >=20 > -------------------------------------------------------------------------= -------------------------------------------------- >=20 >=20 >=20 >=20 >=20 > -- > Communication and Multimedia Laboratory > Dept. of Computer Science and Information Engineering, NTU >=20 >=20 >=20 >