Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Initialisation of Character Arrays Keywords: initialisation Message-ID: <14469@smoke.brl.mil> Date: 15 Nov 90 19:11:01 GMT References: <12585@ganymede.inmos.co.uk> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 11 In article <12585@ganymede.inmos.co.uk> bj@inmos.co.uk (John Honniball) writes: -static char s1[] = "String One"; -static unsigned char s2[] = "String Two"; -static signed char s3[] = "String Three"; -gcc -c -ansi -pedantic u.c -u.c:2: warning: ANSI C forbids string initializer except for `char' elements -u.c:3: warning: ANSI C forbids string initializer except for `char' elements Compiler error. 3.5.7, as you pointed out, says that an array of character type may be initialized by a character string literal. "Character type" is formally defined in 3.1.2.5.