>
> Fine. Have you also moved the link time bindings before hb_errInternal()
> or it works with default SVN code?


Default SVN, with your last commit.


> For pure C mode you probably have to look for some workaround.
> Maybe some magic MSVC #pragma can force linking given modules.


That's probably impossible to find, maybe for someone very very
familiar with MSVC, or by rewriting default startup code (which is
also not working in LTCG, so we should IMO find some better
solution if that's possible at all.

Snippet from MS docs:
"If you use /LTCG and redefine mainCRTStartup, your application can have
unpredictable behavior relating to user code that executes before global
objects are initialized. There are three ways to address this issue: do not
redefine mainCRTStartup, do not compile the file containing mainCRTStartup
with /LTCG, or initialize global variables and objects statically, if
possible."


> BTW you can force C++ like initialization by static variable assignment by:
>   set HB_USER_CFLAGS=-DHB_STATIC_STARTUP
> I left the massage about potential problems caused by pure C initialization
> also in C++ mode in hbinit.h code on:
>       Sat 07 Maj 2005 02:46:38 CEST
> so it's nearly 4 years but I do not know if 3-rd part developers ever
> tried to update their code. Maybe it's time to fully disable this hack?
> If 4 years is not enough then next 10 also won't help.


:)

I'd say let's do it, now.

Brgds,
Viktor
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to