[comp.lang.c++] Release 1.2 bug

kanner@apple.UUCP (Herbert Kanner) (05/14/87)

The following declaration:

	typedef struct foo {
		int x;
		int y;
	} foo, 
	  *fooPtr;

causes cfront to emit the diagnostics:

"filename", line 4: error: syntax error
"filename", line 5: error: syntax error: type expected for pointer fooPtr

Strangely enough, cfront is happy with

	typedef struct foo {
		int x;
		int y;
	} foo;

In an effort to localize the bug, I tried the following, which may or
may not be the same bug--the diagnostics are not quite analagous:

typedef int foo;
typedef foo foo;

produces from cfront:

"filename", line 2: warning; foo redefined

but

typedef int foo;
typedef foo pint1, 
pint2, 
foo, 
sint1, 
sint2;

produces:

"filename", line 4: error: syntax error
"filename", line 5: error: syntax error
"filename", line 6: error: type expected for sint2

Compare the line 6 error message here to the line 5 error message of
the first example.
-- 
Herb Kanner
Apple Computer, Inc.
{idi, ios, nson'pc
Ses, icsed