Re: Sparse parsing question: string literal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christopher,

Because "hello" is array of char from type point of view.

It is same as
char no_ident [] = {'h', 'e', 'l', 'l', 'o', '\0'};

You forgot the static keyword:
Sentence 903:
http://c0x.coding-guidelines.com/6.4.5.html

But depending on context a conversion occurs.
Sentence 729:
http://c0x.coding-guidelines.com/6.3.2.1.html

and your example is one where such a conversion occurs.

--
Derek M. Jones           Software analysis
tel: +44 (0)1252 520667  blog:shape-of-code.coding-guidelines.com
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux