home *** CD-ROM | disk | FTP | other *** search
- #line 1 "#2.cxx"
- void *_new(long);
- void _delete(void*);
- void *_vec_new(void*,int,int,void*(*)(void*));
- void _vec_delete(void*,int,int,void(*)(void*,int),...);
- void exit(int);
- static void cdecl _STI();
- static void cdecl _STD();
-
-
-
- struct boolean {
- int *_boolean_var ;
- } ;
-
- struct no_constructor {
- int _no_constructor_none ;
- } ;
-
- struct no_destructor {
- int _no_destructor_none ;
- } ;
-
- struct nothing { char _dummy; } ;
-
- void proc1 (void );
- void proc2 (void );
-
- int main ()
- {
- {
- int _au1_yes ;
- struct boolean _au1_test ;
- struct no_constructor _au1_x1 ;
- struct no_destructor _au1_x2 ;
- struct nothing _au1_x3 ;
-
- _au1_yes = 1;
-
- //will analyze the following 4 lines:
- ( ( ((& _au1_test )-> _boolean_var
- = (((int *)_new ( (long )(sizeof (int ))) ))),
- ( ((*(& _au1_test )-> _boolean_var )= _au1_yes ),
- (((& _au1_test )))) ) ) ;
-
- /* rearrange the above code into:
- ( (
- (
- (& _au1_test )-> _boolean_var
- = ((
- (int *)_new ( (long )(sizeof (int )) )
- ))
- ),
-
- (
- ((*(& _au1_test )-> _boolean_var )= _au1_yes ),
- (((& _au1_test )))
- )
- ) ) ;
- */
-
- ( (((& _au1_x2 )))) ; //constructor called for x2
-
- proc1 ( ) ;
- proc2 ( ) ;
-
- exit ( (int )0 ) ;
-
- ( (( (( (0 ), 0 ) ), 0 ) ), 0 ) ;
-
- ( (( ( ( _delete ( (void *)(& _au1_test )-> _boolean_var ) , 0 ) ,
- (( (0 ), 0 ) )) , 0 ) ), 0 ) ;
- }
- exit ( 0 );
- }
-
- extern void proc1 ()
- {
- struct boolean _au1_y ;
-
- ( ( ((& _au1_y )-> _boolean_var =
- (((int *)_new ( (long )(sizeof (int ))) ))),
- ( ((*(& _au1_y )-> _boolean_var )= 0), (((& _au1_y )))) ) ) ;
-
- {
- ( (( ( ( _delete ( (void *)(& _au1_y )-> _boolean_var ) , 0 ) ,
- (( (0 ), 0 ) )) , 0 ) ), 0 ) ;
-
- return ;
- }
- }
-
- extern void proc2 ()
- {
- extern struct boolean z (void );
-
- return ;
- }
-
- /* Ignore the warning messages from the translator,
- "#2.cxx", line 15: warning: no_constructor has destructor but no constructor
- "#2.cxx", line 33: warning: near cdecl x1 not used
- "#2.cxx", line 35: warning: near cdecl x3 not used
- */
-