2 bytes allocated problems

Dag-Erling Smørgrav des at des.no
Thu Feb 25 22:46:04 UTC 2010


"Matthias Andree" <matthias.andree at gmx.de> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > char a[9] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' };
> char a[9] = "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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list