Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: const in array bound expression
Message-ID: <1988Aug5.173247.17016@utzoo.uucp>
Organization: U of Toronto Zoology
References: <123@peritus.UUCP>
Date: Fri, 5 Aug 88 17:32:47 GMT

In article <123@peritus.UUCP> preston@peritus.UUCP (Preston Gardner) writes:
>    const int agg[] = { 1, 1, 2, 3, 5, 8, 13, 21, 34 };
>    int a[agg[4]];

Check the restrictions on the operands permissible in constant expressions;
I believe you will find that "agg" is not legal in an integer constant
expression, which is what's wanted in that context.

(At least, this is the way it is in the January draft; I have no idea what
the May draft says, since I haven't seen it yet.  Grr.)
-- 
MSDOS is not dead, it just     |     Henry Spencer at U of Toronto Zoology
smells that way.               | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
