This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C const identifiers and constant expressions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]