Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems

C Programming Language
Content starts here

Compaq C V6.4 for OpenVMS VAX Release Notes


Previous Contents


/* relaxed, strict_refdef --> definition */
int global_var=1;
When modules A and B were linked together on a pre-V6.1 VAX system, the linker failed to treat the declaration of global_var in A.C as a reference to the definition of global_var in B.C. Instead, references to global_var in A.C used the address zero. No linker messages were produced, and an executable would ACCVIO when global_var was referenced.
This problem can be worked around by using one of the following techniques:
  1. Upgrade the system to OpenVMS V6.1 or higher (preferably V6.2 or higher).
  2. When using /EXTERN_MODEL=RELAXED_REFDEF (this is the default), declare all external references using the keyword extern , and only have a single declaration as the definition that lacks the keyword extern or initializes the variable.
  3. Use /EXTERN_MODEL=STRICT_REFDEF for all modules. This produces the most portable source code.
  4. Use /EXTERN_MODEL=COMMON for all modules.

Previous Contents Contents

 

 

** About PDF files: The PDF files on this Web site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software installed on your system, you may download it from the Adobe Web site.
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.