[3508] in Athena Bugs
Saber msg: v2.1 (5/10/89 pit-manager ibmrt Unix 4042 0)
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Oct 26 23:59:54 1989
Date: Thu, 26 Oct 89 23:59:32 -0400
From: Jonathan I. Kamens <jik@PIT-MANAGER.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
I have a file which contains the following:
struct point {
int x;
int y;
};
int frep()
{
struct point i = {1, 2};
printf("%d, %d\n", i.x, i.y);
}
Saber (both the one I'm using now and the new Beta one you just sent to MIT)
complains:
The '{ ... }' construction cannot be use with automatic aggregates.
when it gets to the initialization of i. However, I believe that ANSI C
allows this initialization. To quote from K&R Second Edition, "The first
edition did not countenance initialization of automatic structures, unions,
or arrays. The ANSI standard allows it, but only by constant constructions
unless the initializer can be expressed by a simple expression."
Both our hc2 RT compiler and gcc compile this function with no errors.
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik@Athena.MIT.EDU Allston, MA 02134
Office: 617-253-4261 Home: 617-782-0710