Keil Logo

C166: PROBLEMS ACCESSING STRUCTURES USING POINTERS


Information in this article applies to:

  • C166 Version 4.02

SYMPTOMS

I have declared a structure and located it at 2000H using the HVAR macro. I then tried to access an element of the array using a pointer:

typedef struct S1_S
{
  int i1;
  int i2;
  long l1;
  long l2;
  char c1;
  char c2;
} S1;

#define S1_var HVAR( S1, 0x2000 )

long *P_long = &S1_var.l2;

Assigning values to the pointer doesn't work.

CAUSE

This is a bug in the compiler and you require version 4.05 of the C166 compiler or better.

RESOLUTION

Download and install version C166 4.05 or later. You may download the latest updates from the Keil Website.

Last Reviewed: Thursday, March 20, 2003


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.