This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc: why is "abcdef"[3] not a constant (error: initializer element is not constant)
- From: Andrew Haley <aph at redhat dot com>
- To: m-h-l <markus dot lehmann at intel dot com>, gcc-help at gcc dot gnu dot org
- Date: Fri, 08 May 2015 14:09:21 +0100
- Subject: Re: gcc: why is "abcdef"[3] not a constant (error: initializer element is not constant)
- Authentication-results: sourceware.org; auth=none
- References: <1431076943221-1146945 dot post at n5 dot nabble dot com> <554C98A4 dot 8030404 at redhat dot com> <1431086743832-1146998 dot post at n5 dot nabble dot com>
On 05/08/2015 01:05 PM, m-h-l wrote:
> So this means C doesn't have any constant strings at all ?
No, it means you have to go away and read the section of the C standard
called "Constant expressions" and come back if there's anything you
still don't understand.
Andrew.