On Fri, Apr 24, 2009 at 10:37:15AM -0700, Chris Quenelle wrote:
> The compiler team is working on folding lint functionality
> into the C compiler. I there will be some progress in 
> Sun Studio 12.1 (Ceres release). 

Not really.
The functionality is mostly there, but we did not have anough time to tune it 
up :(

> I have no idea about
> the specific details of specific error messages though.
> I'm pretty sure you're out of luck with SS12 for that
> specific error.

That is true.

regards,
  Fedor.

> 
> --chris
> 
> 
> Roland Mainz wrote:
> > Chris Quenelle wrote:
> >> Roland Mainz wrote:
> >>> Does Sun Studio 12 have a warning for statements like...
> >>> -- snip --
> >>> int pd;
> >>> char *ptr1,
> >>>      *ptr2;
> >>> /* ... */
> >>> pd = ptr2-ptr1;
> >>> -- snip --
> >>> ... on 64bit targets ?
> >>>
> >>> I've spend today some hours to dig-out this kind of bug where a pointer
> >>> difference (32bit on 32bit SPARC and 64bit on 64bit SPARC, e.g. a
> >>> |ptrdiff_t|) is stored in an |int| (32bit integer) the loss of bits
> >>> trigged a malfunction...
> >>> ... somehow I was wondering why Sun Studio didn't warn about this.
> >> There's a chapter in the C user's guide about porting programs
> >> from 32-bits to 64-bits.  It mentions a lint flag
> >>
> >>    -errchk=longptr64 flag checks assignments of pointer
> >>    expressions and long integer expressions to plain
> >>    integers, even when explicit casts are used.
> >>
> >> http://docs.sun.com/app/docs/doc/819-5265/bjami?a=view
> > 
> > Is there any way to enable this specific warning for the compiler pass ?
> > Right now "lint" doesn't work for any of the AST/ksh93 sources properly
> > because it doesn't like stuff like the following:
> > -- snip --
> > int foo(int c);
> > 
> > int foo(register int c)
> > {
> > /* ... */
> > return x;
> > }
> > -- snip --
> > ... that's valid for ISO-C99 but "lint" generates lots of noise on this
> > kind of things ... ;-(
> > 
> > ----
> > 
> > Bye,
> > Roland
> > 
> 
> _______________________________________________
> tools-compilers mailing list
> tools-compilers at opensolaris.org

Reply via email to