home *** CD-ROM | disk | FTP | other *** search
- #if 0
- From: Scott Ladd
- Subject: far static member functions
- Status: Fixed in 3.0
- #endif
-
- /*
- This is a VERY serious bug in how ZTC handles function pointers to
- static member functions. When compiled with:
-
- ztc slz3bugc.cpp
-
- The following error is emitted:
-
- ztcpp1x -oe:\ztc_1.tmp slz3bugc.cpp
- FPtr fp = X::Function;
- ^
- slz3bugc.cpp(16) : Error: cannot implicitly convert
- from:<near *><near C++ func(<int>) returning><int>
- to :<_pascal far *><_pascal far Pascal func(<int>) returning><int>
-
- --- errorlevel 1
- */
-
-
- class X
- {
- public:
- static int _far _pascal Function(int x);
- };
-
- int _far _pascal X::Function(int x)
- {
- return x;
- }
-
- typedef int (_far _pascal * FPtr)(int x);
-
- int main()
- {
- FPtr fp = X::Function;
-
- return 0;
- }
-