Andre Poenitz <[EMAIL PROTECTED]> writes:

| On Tue, May 28, 2002 at 10:08:13AM +0200, Lars Gullik Bjønnes wrote:
>> 
>> | cxx: Error: formulabase.C, line 367: identifier "abs" is undefined
>> |          if (abs(x - first_x) < 2 && abs(y - first_y) < 2) {
>> | ------------^
>> 
>> I belive that abs as a macro is not allowed in C++.
>
| Indeed.
>
>> Also it might be that you compiler (correctly) puts abs in namespace
>> std. Try changing the abs(...) to std::abs(...)
>
| The 'using std::abs; ' is missing.

mmm... note that f.ex. gcc will then complain if abs is not in std::
(no such symbol in namespace std)

So we will have to guard that "using".
 
>> | cxx: Warning: formulabase.C, line 826: unrecognized preprocessing directive
>> | #warning pretty ugly
>> | -^
>> 
>> and this... but these are only warnings should should not matter for
>> the real compile.
>
| THey _are_ guarded by #ifdef WITH_WARNINGS

Then if WITH_WARNINGS is not defined there is a bug in the cxx
preprocessor; and if it is defined we define it when we shouldn't.

-- 
        Lgb


Reply via email to