On Wed, 09 Dec 2009, Szak�ts Viktor wrote:
Hi,
> > Unlike #pragma startup this initialization does not use
> > in #pragma directive so we can also store above definition
> > in single header file hbiniseg.h and then use in other code:
> > #elif defined( HB_DATASEG_STARTUP )
> > #define H
Przemysław Czerpak wrote:
and I need to know if MSC supports:
#pragma off (unreferenced)/* to disable unused variable warnings */
#pragma on (unreferenced) /* to enable unused variable warnings */
or at least silently ignores them.
Can someone using MS[V]C check it?
With
Hi Przemek,
> Unlike #pragma startup this initialization does not use
> in #pragma directive so we can also store above definition
> in single header file hbiniseg.h and then use in other code:
>
> #elif defined( HB_DATASEG_STARTUP )
> #define HB_DATASEG_BODY HB_DATASEG_FUNC( init_func )
Hi,
I've just make few tests with OpenWatcom and checked how it generates
startup code for C++ static initialization.
It uses "XI" data segment to store list of pairs:
{ ushort 0x4000, void (*func_ptr)(void) }
So we can reach the same effect using #pragma(s), i.e.:
void init_func( void )