This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C const identifiers and constant expressions
- From: Falk Hueffner <falk at debian dot org>
- To: Michael Winslow <liandril at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 22 Mar 2005 09:53:26 +0100
- Subject: Re: C const identifiers and constant expressions
- References: <20050322001828.63575.qmail@web31010.mail.mud.yahoo.com>
Michael Winslow <liandril@yahoo.com> writes:
> Is there some way short of resorting to preprocessor macros to tell
> the compiler that an identifier is a compile-time constant, and is
> therefore suitable for use in sizing an array?
You can use an enum value. But there's little point in that; a
preprocessor macro will do just fine and is more idiomatic.
--
Falk