This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-2.95 19990623 (prerelease) problem with string initializer and -fwritable-strings
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: gcc-2.95 19990623 (prerelease) problem with string initializer and -fwritable-strings
- From: Juergen Keil <jk at tools dot de>
- Date: Mon, 5 Jul 1999 22:21:36 +0200 (MET DST)
- Reply-To: Juergen Keil <jk at tools dot de>
Hi,
The current gcc 2.95 snapshots have problems with string initializers,
when compiling with the -fwritable-strings option:
% cat x.c
struct {
char bla[2];
} data = {
"xx",
};
% gcc -fwritable-strings -S x.c
x.c:4: initializer element is not constant
x.c:4: (near initialization for `data.bla')
% gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/gcc-2.95/specs
gcc version gcc-2.95 19990623 (prerelease)
Without the -fwritable-strings option, the file compiles ok.
--
Juergen Keil jk@tools.de
Tools GmbH +49 (228) 9858011