This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: initializer bug?
- To: Neal Becker <neal at ctd dot comsat dot com>
- Subject: Re: initializer bug?
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 10 Mar 1998 13:24:23 -0800
- Cc: egcs at cygnus dot com
- References: <E0yCQkt-0001YV-00@spock.ctd.comsat.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Mar 10, 1998 at 10:15:47AM -0500, Neal Becker wrote:
> Isn't this a bug?
>
> static const int A = 2;
> static const int B = A/2;
That is only valid in C++. In ISO C, a const int is not a
compile-time constant expression.
r~