C inconsistency?

Rajiv Sarathy sarathy at gpu.utcs.toronto.edu
Fri Mar 31 10:29:03 AEST 1989


Is this an inconsistency ?:

	struct element {
	    char *key;
	    int level;
	    struct element **fpointer;
	}
	struct element *head[LEVELCAP];     /* array of pointers to struct */

Microsoft C 5.1 in MS-DOS compiles this alright, but neither cc nor gcc are
able to compile in UNIX 4.1 (or is it 4.2, I can't remember).

cc merely gives a "syntax error at or near" the line having the array
declaration.

gcc, however, complains that "two or more data types in declaration" exist (at
the line having the array declaration).

Any ideas why?  (I think I know why it doesn't work for cc, but I don't know
why for gcc).

--Raj

-- 
 _____________________________________________________________________________
| Disclaimer:  I'm just an undergrad.                                         |
| All views and opinions are therefore my own.                                |
|                                                                             |
| Rajiv Partha Sarathy                   sarathy at gpu.utcs.utoronto.ca         |
|                             {uunet!attcan mnetor att pyramid}!utgpu!sarathy |
|_____________________________________________________________________________|




More information about the Comp.lang.c mailing list