Dave Pagan <[email protected]> wrote:
>
> Tomas,
>
> This bug has been fixed in Oracle Solaris Studio 12.2. However, the
> given test case will still get a lint warning for the printf. The reason
> is that "wc" expects an 'int' argument but is given a 'long' argument
> (wchar_t is a typedef'd long). You'd get the same warning if, for
> example, you used "%c" and supplied a 'long' argument.
Good to hear...
BTW: A well known algorithm to append to a list:
pr_t *pr_root;
pr_t **pr_tail = &pr_root;
....
new->pr_next = (pr_t *)0;
*pr_tail = new;
pr_tail = &new->pr_next;
results in lint warnings that "pr_root" is definitely a NULL pointer.
Is there hope that future lint versions will learn about this algorithm?
Jörg
--
EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
[email protected] (uni)
[email protected] (work) Blog:
http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
tools-compilers mailing list
[email protected]