c++/8295: problem with method name log2

aiguo_1997@yahoo.com aiguo_1997@yahoo.com
Sun Oct 20 20:06:00 GMT 2002


>Number:         8295
>Category:       c++
>Synopsis:       problem with method name log2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 20 20:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     aiguo_1997@yahoo.com
>Release:        gcc version 3.2 20020818 (prerelease)
>Organization:
>Environment:
Cygwin
>Description:
Compiler fails to compile if there is a member function named log2() taking more than 1 parameters and the header <iostream> is included. Error says "gcc version 3.2 20020818 (prerelease)", possibly caused the the math macro log2(). No error if <iostream> is not included (possibly iostream uses log2 math macro).
>How-To-Repeat:
The following simple code will produce the error:

#include <iostream>

class myLog{
public:
inline virtual void log2( int x, int x2 ){}
};
int main()
{
return 0;
}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list