C inconsistency?

Tim_CDC_Roberts at cup.portal.com Tim_CDC_Roberts at cup.portal.com
Sat Apr 1 05:28:49 AEST 1989


In <1989Mar30.192903.28426 at gpu.utcs.toronto.edu>, Rajiv Sarathy writes:

>	struct element {
>	    char *key;
>	    int level;
>	    struct element **fpointer;
>	}
>	struct element *head[LEVELCAP];     /* array of pointers to struct */
>
> 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 know! I know!  The Tim Roberts visual unoptimizing C precompiler gives
the following error message:

	struct element {
	    char *key;
	    int level;
	    struct element **fpointer;
	}
*******  ^ Missing Semicolon In Declaration.  Probable Havoc Follows.
	struct element *head[LEVELCAP];     /* array of pointers to struct */

Microsoft C also barfs on this.  I suspect that the semicolon got deleted
in transition.
 
Tim_CDC_Roberts at cup.portal.com                | Control Data...
...!sun!portal!cup.portal.com!tim_cdc_roberts |   ...or it will control you.



More information about the Comp.lang.c mailing list