C Language Software Release Document
Software Release 9.7
Part No. 05500-B00
This document describes the C compiler
for DOMAIN software release 9.7.
APOLLO COMPUTER INC.
330 Billerica Road
Chelmsford, Massachusetts 01824
Copyright c 1987 Apollo Computer Inc.
All rights reserved. Printed in U.S.A.
First Printing: October, 1987
Latest Printing: October, 1987
This document was formatted using the FMT tool distributed with the Domain
computer system.
Apollo and Domain are registered trademarks of Apollo Computer Inc.
3DGR, Aegis, D3M, DGR, Domain/Access, Domain/Ada, Domain/Bridge, Domain/C,
Domain/ComController, Domain/CommonLISP, Domain/CORE, Domain/Debug,
Domain/DFL, Domain/Dialogue, Domain/DQC, Domain/IX, Domain/Laser-26,
Domain/LISP, Domain/PAK, Domain/PCC, Domain/PCI, Domain/SNA, Domain/X.25,
DPSS/Mail, DSEE, FPX, GMR, GPR, GSR, Network Computing Kernel, NCK, Network
Computing System, NCS, Open Network Toolkit, Open System Toolkit, OST,
Personal Workstation, and Series 3000 are trademarks of Apollo Computer Inc.
Apollo Computer Inc. reserves the right to make changes in specifications and
other information contained in this publication without prior notice, and the
reader should in all cases consult Apollo Computer Inc. to determine whether
any such changes have been made.
THE TERMS AND CONDITIONS GOVERNING THE SALE OF APOLLO COMPUTER INC. HARDWARE
PRODUCTS AND THE LICENSING OF APOLLO COMPUTER INC. SOFTWARE PROGRAMS CONSIST
SOLELY OF THOSE SET FORTH IN THE WRITTEN CONTRACTS BETWEEN APOLLO COMPUTER
INC. AND ITS CUSTOMERS. NO REPRESENTATION OR OTHER AFFIRMATION OF FACT
CONTAINED IN THIS PUBLICATION, INCLUDING BUT NOT LIMITED TO STATEMENTS
REGARDING CAPACITY, RESPONSE-TIME PERFORMANCE, SUITABILITY FOR USE OR
PERFORMANCE OF PRODUCTS DESCRIBED HEREIN SHALL BE DEEMED TO BE A WARRANTY BY
APOLLO COMPUTER INC. FOR ANY PURPOSE, OR GIVE RISE TO ANY LIABILITY BY APOLLO
COMPUTER INC. WHATSOEVER.
IN NO EVENT SHALL APOLLO COMPUTER INC. BE LIABLE FOR ANY INCIDENTAL,
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT
LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATING TO THIS PUBLICATION OR
THE INFORMATION CONTAINED IN IT, EVEN IF APOLLO COMPUTER INC. HAS BEEN
ADVISED, KNEW OR SHOULD HAVE KNOWN OF THE POSSIBILITY OF SUCH DAMAGES.
THE SOFTWARE PROGRAMS DESCRIBED IN THIS DOCUMENT ARE CONFIDENTIAL INFORMATION
AND PROPRIETARY PRODUCTS OF APOLLO COMPUTER INC. OR ITS LICENSORS.
Reader_Notice
This document resides online in the /doc directory. To print a copy of this
document, use the PRF command with the -npag and -pr options.
PRF <file_pathname> -PR <printer_name> -NPAG
iii
Contents
Section
CHAPTER 1 OVERVIEW OF DOMAIN C Language SR 9.6 . . . . . . . . . . 1-1
1.1 Choosing a Version . . . . . . . . . . . . . . . . . . . 1-1
CHAPTER 2 SOFTWARE INSTALLATION PROCEDURES . . . . . . . . . . . . 2-1
CHAPTER 3 DOCUMENTATION . . . . . . . . . . . . . . . . . . . . . 3-1
CHAPTER 4 BUGS AND BUG FIXES . . . . . . . . . . . . . . . . . . . 4-1
4.1 Bugs Fixed Since 9.6 . . . . . . . . . . . . . . . . . . 4-1
Contents iv
CHAPTER 1
OVERVIEW OF C AT SR9.7
The SR9.7 release of the C language compiler is a bug-fix release. No new
functionality has been added to the compiler since SR9.6. See Chapter 4 for
a list of bugs fixed.
If you are updating from a 9.6 release of the C compiler, these release notes
are all you need. If you are updating from a previous release, you should
look at the release notes that accompanied the intervening releases. For
instance, if you are going from SR9.2 to SR9.7, you should read
"cc.release_notes.sr9.5" and "cc_release_notes.sr9.6" in addition to the
SR9.7 release notes.
1.1 Choosing a Compiler Version
If you are developing programs to run on systems that are running the SR9.2
version of the operating system, you will want to compile your programs with
the SR9.2 version of the C compiler. When you install the SR9.7 C compiler,
you will also get the SR9.2 compiler. If you need to use the older version,
compile your file(s) with the following command:
$ ccsr9.2 filename [-options]
To compile with the SR9.7 version, use the usual command; that is:
$ cc filename [-options]
1-1 C Compiler Release 9.7
C Compiler Release 9.7 1-2
CHAPTER 2
INSTALLATION INFORMATION
You can add the C compiler Version 4.89 to a user node (one equipped with
monitor and keyboard) or a Domain Server Processor (DSP) that is running
SR9.0 or a more recent version of the Aegis or Domain/IX operating system.
If the user node or DSP is not running SR9.0 or a more recent version, follow
the appropriate software update procedures as described in Installing__Domain
Software (Order No. 008860) or in the appropriate release notes.
For directions about how to install this product, see the manual Installing
Domain_Software, (Order No. 008860).
NOTE: The user node or DSP must have a minimum of 1850 blocks of
available disk space for a successful installation of this
software.
2-1 C Compiler Release 9.7
CHAPTER 3
DOCUMENTATION
The current C Language Reference manual (order no. 002093, rev. 04) reflects
the C compiler as of Software Release 9.2. New features added at Software
Releases 9.5 and 9.6 are documented in the SR9.5 and SR9.6 release notes,
which are available online in files "cc.release_notes.sr9.5" and
"cc.release_notes.sr9.6". The current release does not contain any new
functionality.
3-1 C Compiler Release 9.7
CHAPTER 4
BUGS AND BUG FIXES
This chapter describes bugs fixed since SR9.6. There are no known bugs or
limitations in this release of the C compiler.
4.1 Bugs Fixed Since 9.6
The following bugs have been fixed since the SR9.6 release. The number
refers to the UCR (User Change Request) number assigned by Customer
Services.
o (0d886075) In certain instances the optimizer would assign a global
variable to a register even though the variable could be accessed
indirectly through a pointer. In the following example, for
instance, the pointer conf1 points to the variable extvar. Because
extvar is stored in a register, however, decrementing it does not
affect the dereferenced value of conf1.
int extvar, alias;
typedef struct {
short f1;
short f2;
} str;
str *confl;
static setaddr() {
/* store the address of an "external" in a pointer variable.
When the pointer variable is dereferenced, the external is
also referenced.
*/
confl = (str *)&extvar;
extvar = 1;
}
static test0_1() {
int i;
4-1 C Compiler Release 9.7
/* the incorrect action in this loop is to assign a register to
the external variable. This because the reference via the
pointer load accesses the CURRENT value of the external.
*/
for (i = 1; i<= 2; i++) {
extvar--;
alias = confl->f1;
}
}
This bug has been fixed.
o (0d886074) In certain instances, the optimizer produced faulty code
when optimizing invariant expressions out of loops. These bugs have
been fixed.
o (0d886073) In certain instances, the compiler produced incorrect
results for boolean expressions. These bugs have been fixed.
o (0d886067) At SR9.6 and previous releases, the C compiler was unable
to assign large floating-point values to integer variables. For
example, the program,
main()
{
unsigned int i;
i = (unsigned int) (double) 4294967295.0; /* same as 0xFFFFFFFF
}
produced the following error message:
******** Line 4: [Error 135] Floating point constant " 4294967295.000000 "
conversion problem.
?(compiler) overflow in convert to long integer (library/floating point)
This bug has been fixed at SR9.7.
o (0d885948) At SR9.5 and SR9.6 the optimizer sometimes produced wrong
results for series of expressions that contained dereference
operations and side-effects. This bug has been fixed at SR9.7.
o (0885755) Rev. 4.65 and previous revs of the cc compiler contained a
bug that affected initialization of static forward-referenced
structures. For example, the following initialized a_ref in
unpredictable ways.
struct refstruct {
int *addr;
};
C Compiler Release 9.7 4-2
extern int a[];
static struct refstruct a_ref = { &(a[1]), };
static int a[] = { 0, 0, };
This problem only occurred when both the structure and the array were
declared with static duration. This bug has been fixed at SR9.7.
4-3 C Compiler Release 9.7
4-1 C Compiler Release 9.7