[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference decwet::visual

Title:Microsoft Visual C++ bug reports and kits
Notice:Register in Topic 2. 5.Last for latest Kit
Moderator:DECWET::THOMASN
Created:Tue May 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:521
Total number of notes:2938

459.0. "code generation problem?" by VARESE::CORBETTA () Thu Feb 06 1997 00:11


The following code:

typedef struct _yyy_int_s {
   struct _yyy_int_s *xxx_self;          
   yyy_attr_t       attr;                   
   yyy_startroutine_t start_routine;        
   yyy_addr_t       arg;                    
   DWORD            id;                 
   HANDLE           handle;                 
   HANDLE           cancel_event;           
   LONG             mutex_rundown;          
   BOOL             running;               
   BOOL             detached;               
   BOOL             cancelled;              
   BOOL             asyncancel;            
   BOOL             cancellable;         
}                   yyy_int_t;

typedef yyy_int_t           *yyy_t;

extern yyy_t yyy_self(void);

#define yyy_set_id(xxx_p) ((yyy_int_t *)(* xxx_p))->id

static unsigned long getid()
{
  yyy_t t;
 
  t = yyy_self();
  return(yyy_set_id(&t));
}

generates an exception on Alpha NT (not on X86 NT), the exception raises
executing the return statement. That does not happen if I compile with 
DEBUG option. I changed the code :

static unsigned long getth()
{
  yyy_t t;
  unsigned long ret;
 
  t = yyy_self();
  ret = yyy_set_id(&t);
  return ret;
}

and it properly works.

Can it be a code generation problem?

Thanks

			MariaLuisa 
T.RTitleUserPersonal
Name
DateLines
459.1VARESE::CORBETTAFri Feb 07 1997 00:513
I found the problem, my fault, sorry!

			MariaLuisa