Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP C/HP-UX Release Notes for HP-UX 11.01: HP 9000 Computers > Chapter 1 New and Changed Features

+ESconstlit and +ESnolit compiler options

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

The +ESconstlit and +ESnolit compiler options have been added to HP C. These options, grouped with +ESlit, control HP C's storage mechanism for strings in read-only memory.

  • +ESconstlit introduces a new default behavior, in which the HP C compiler stores constant-qualified (const) objects and literals in read-only memory.

  • +ESnolit compiler option disables the default behavior, and causes the HP C compiler to no longer store literals in read-only memory. This restores the compiler's traditional behavior prior to this release.

  • Use of the +ESlit option places all string literals in read-only memory

Storing const-qualified string literals in read-only memory can cause a program which violates the semantics of const to abnormally terminate with a bus error and core dump. This is because literals, which have been placed in read-only memory may not be modified at runtime. Specifying +ESnolit will allow you to specify that literals not be placed in read-only memory.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.