On Fri, 06 Mar 2009, Szak�ts Viktor wrote: > > f.e. hbgtcore[3359]: > >> hb_errInternal( 9998, "Screen driver initialization failure", NULL, NULL > >> ); > >> /* force linking HB_GTSYS() */ > >> HB_FUNC_EXEC( HB_GTSYS ); > >> If you want then you can cleanup all such bindings. But if MSVC > >> tries to be more clever then programmers then it won't help and > >> all such bindings in any locations will be pacified by optimizer. > I've moved HB_FUNC_EXEC() to the top of the function, > but MSVC is smart enough to optimize it out.
I was afraid that it may happen. > There is '__declspec( noinline )' maybe we should have > a HB_FUNC_ANNOUNCE() or similar way to declare such function, > having this modifier. What do you think? It still may not be enough. It's possible that MSVC divides the module gtsys.o into peaces and inline only pure HB_GTSYS function ignoring the HB_GT_REQUEST() part. Just try and tell us if it helps but not commit it yet. It's not portable solution and does not have to work in all cases. In the worst case we will have to store explicitly function references in some table and it's possible that we will have to use real functions because some compilers may merge all functions with the same body (empty in our case) into single one. Maybe MSVC has a switch to control used module/bindings stripping. It also may resolve the problem. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
