Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Feb 2010 23:46:03 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "Matthias Andree" <matthias.andree@gmx.de>
Cc:        Andrey Zonov <andrey.zonov@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: 2 bytes allocated problems
Message-ID:  <86vddlaq8k.fsf@ds4.des.no>
In-Reply-To: <op.u8peedxy1e62zd@merlin.emma.line.org> (Matthias Andree's message of "Thu, 25 Feb 2010 23:07:15 %2B0100")
References:  <983a1cf21002240544s59006035ifbf0ef7eb045e44f@mail.gmail.com> <86eikar7gv.fsf@ds4.des.no> <4B858007.1000008@gmail.com> <86sk8qpfx8.fsf@ds4.des.no> <op.u8peedxy1e62zd@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Matthias Andree" <matthias.andree@gmx.de> writes:
> Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
> > char a[9] =3D { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' };
> char a[9] =3D "abcdefghi";
>
> suffices. The compiler knows there isn't room for the terminal '\0'
> and omits it.

Some compilers (gcc at least) warn about it.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86vddlaq8k.fsf>