bugchannelflow: a spectral fluid-flow simulator - Bugs: bug #13292, trouble with log2 macro in...

 
 

bug #13292: trouble with log2 macro in mathdefs.cpp

Submitted by:  None
Submitted on:  Sat 04 Jun 2005 06:59:55 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 08 Jun 2005 04:10:33 PM UTC, comment #1:

Thanks. I'll remove the inline function and the macro LOG2 in the next release.

John

John F. Gibson <gibson17>
Project Administrator
Sat 04 Jun 2005 06:59:55 AM UTC, original submission:

Compiling the may 25th release (channelflow-0.9.13) on the cygnus port of the unix development tools, on Windows XP, and precisely using gcc 3.4.1 I get this:

$ make lib
g++ -Wall -O3 -DNDEBUG -c mathdefs.cpp
In file included from mathdefs.cpp:30:
mathdefs.h:61: error: expected `)' before '/' token
mathdefs.h:61: error: expected `,' or `;' before '/' token
make: *** [mathdefs.o] Error 1

The source of the trouble is:

inline Real log2 (Real x) {
return log (x) / LOG2;
}

The workaround is to delete the inline function since it's used nowhere in the code.
Or since with that version of the math libaries it is already included:

/// test.cc
#include <iostream>
#include <math.h>

main() {
std::cout << log2(1024) << std::endl;
}
/// test.cc end

$ gcc test.cc -lm -lstdc++
$ ./a.exe
10

P.S. if you have comments you can find me on paolo.greppi at nospam.tiscali.it

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 15 Jun 2005 05:39:54 PM UTCgibson17StatusNone=>Fixed
Wed 08 Jun 2005 04:10:33 PM UTCgibson17Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1