c++/7019: erroneous failure to compile

david.abrahams@rcn.com david.abrahams@rcn.com
Thu Jun 13 09:35:00 GMT 2002


>Number:         7019
>Category:       c++
>Synopsis:       erroneous failure to compile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 08:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     david.abrahams@rcn.com
>Release:        gcc-3.1
>Organization:
>Environment:
Cygwin
>Description:
compile the code below
>How-To-Repeat:
template <class T, int (T::*)> struct foo;

template <class T>
int f(foo<T,&T::ob_type>*);

template <class T>
char* f(...);

struct X { int ob_type; };
struct Y { char* ob_type; };
  int x = f<X>(0);
char* y = f<Y>(0);
char* z = f<int>(0);

int main() { return 0; }
>Fix:

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



More information about the Gcc-bugs mailing list