bleat, bleat : no Lint for C++ on Solaris ???

bleat, bleat : no Lint for C++ on Solaris ???

Post by Laurence Lindstro » Thu, 09 Jul 1998 04:00:00




> Hi,

> I'm posting a second query about this, as I didn't hear from anyone in
> over two weeks.

   I sympathies.  It's tough to be drowning for want of an answer
while the greatest minds of this group are debating the best way
to remove a file by the name of "-l".  

Quote:> I'm reading Peter Van Der Linden's fine book 'Expert C Programming', and
> have taken to heart is admonition to "Lint early, Lint Often" (p59) but...

> I can't figure out how to get lint to work for C++ files. The man pages in
> AnswerBook all use phrases like 'linting a C program'. Using lint, even
> from the command line (avoiding any make-osities), with a file that is not
> a .c extension, produces an error.

> Can this really be?! No lint for C++?

   That's my understanding.  I think C++ has better warnings than
C, but I don't think it's up to lint's quality.  

   I have the full Visual Workshop for C++ install.  

   Am I wrong?  Please, tell me I'm full of *and point me at
the C++ lint.  

                                                           Larry

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by ne.. » Fri, 10 Jul 1998 04:00:00


Hi,

I'm posting a second query about this, as I didn't hear from anyone in  
over two weeks.

I'm reading Peter Van Der Linden's fine book 'Expert C Programming', and  
have taken to heart is admonition to "Lint early, Lint Often" (p59) but...

I can't figure out how to get lint to work for C++ files. The man pages in  
AnswerBook all use phrases like 'linting a C program'. Using lint, even  
from the command line (avoiding any make-osities), with a file that is not  
a .c extension, produces an error.

Can this really be?! No lint for C++?

Or can I take Peter's next statement "... lint .... check(s) for  
consistency of function use across multiple files. .... All Ada compilers  
do this multifile consistency checking; it is the trend in C++  
translators, and perhaps eventually will be usual in C, too" as a sign  
that lint has been moved into the C++ compiler?? (I think he hints at this  
again in another spot in the book)

Finally, any advise on installing the 'right' packages?
We have SUNWspro installed and lint is visible in /opt/SUNWspro/bin. Do we  
need other packages as well to get  C++ lint?

Thanks for any ideas!

Neil Mahoney
#include <std/disclaimer.h>

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by Laurence Lindstro » Fri, 10 Jul 1998 04:00:00



> Hi,

> I'm posting a second query about this, as I didn't hear from anyone in
> over two weeks.

   I sympathize.  It's tough to be drowning for want of an answer
while the greatest minds of this group are debating the best way
to remove a file by the name of "-l".  

Quote:> I'm reading Peter Van Der Linden's fine book 'Expert C Programming', and
> have taken to heart is admonition to "Lint early, Lint Often" (p59) but...

> I can't figure out how to get lint to work for C++ files. The man pages in
> AnswerBook all use phrases like 'linting a C program'. Using lint, even
> from the command line (avoiding any make-osities), with a file that is not
> a .c extension, produces an error.

> Can this really be?! No lint for C++?

   That's my understanding.  I think C++ has better warnings than
C, but I don't think it's up to lint's quality.  

   I have the full Visual Workshop for C++ install.  

   Am I wrong?  Please, tell me I'm full of *and point me at
the C++ lint.  

                                                           Larry

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by Casper H.S. Dik - Network Security Engine » Fri, 10 Jul 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>I can't figure out how to get lint to work for C++ files. The man pages in  
>AnswerBook all use phrases like 'linting a C program'. Using lint, even  
>from the command line (avoiding any make-osities), with a file that is not  
>a .c extension, produces an error.

Lint doesn't support C++ only C.  C++ is supposed to be stronger typed
and many of teh checks aren't necessary any longer.

Quote:>Can this really be?! No lint for C++?
>Or can I take Peter's next statement "... lint .... check(s) for  
>consistency of function use across multiple files. .... All Ada compilers  
>do this multifile consistency checking; it is the trend in C++  
>translators, and perhaps eventually will be usual in C, too" as a sign  
>that lint has been moved into the C++ compiler?? (I think he hints at this  
>again in another spot in the book)

In C++, the .o files encode not only function names but also how they
shoudl be called (this is required for overloadign ut gives you free
iner module type checking)

Quote:>Finally, any advise on installing the 'right' packages?
>We have SUNWspro installed and lint is visible in /opt/SUNWspro/bin. Do we  
>need other packages as well to get  C++ lint?

There's no C++ lint and you surely don't need ti for inter module
consistency.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by Achim Grat » Fri, 10 Jul 1998 04:00:00



> I can't figure out how to get lint to work for C++ files. The man pages in  
> AnswerBook all use phrases like 'linting a C program'. Using lint, even  
> from the command line (avoiding any make-osities), with a file that is not  
> a .c extension, produces an error.

You don't.  Lint is for C only, the checks it does are done by the
compiler for C++ (at least if you turn all warnings on).

Achim Gratz.

--+<[ It's the small pleasures that make life so miserable. ]>+--
WWW:    http://www.inf.tu-dresden.de/~ag7/{english/}

Phone:  +49 351 463 - 8325

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by nsi4040000-Dugga » Fri, 10 Jul 1998 04:00:00


Quote:

> Lint doesn't support C++ only C.  C++ is supposed to be stronger typed
> and many of teh checks aren't necessary any longer.

> >Can this really be?! No lint for C++?

It is correct that the original 'lint' program only supports C.  However, there
are a number of commercial C++ static analysis tools available, and I would
*strongly* recommend that any commercial software development project uses at
least one of these - you will be horrified at what they tell you about your
code!

Dr. Dobbs Journal had a very useful comparison between tools in the February,
1997 issue.  A preview of the results can be seen at:

    http://www.teleport.com/~smeyers/ddjpaper1.html

    Hugh

-----------------------------------------------------------
Hugh Duggan                 | Phone   : +44 1666 832118
Lucent Technologies         | FAX     : +44 1666 832925
Building 7,                 |

Bellinger Road,             |
Chippenham,                 |
UNITED KINGDOM              |

 
 
 

bleat, bleat : no Lint for C++ on Solaris ???

Post by ne.. » Fri, 10 Jul 1998 04:00:00


Hi Folks,

Thanks a lot for taking the time to post your replies. They have put to  
rest my search for c++ lint. Phew!

I'm hoping that it is true that we don't need lint so much with C++.  
Wether we get a 3rd party tool or not is something I won't be deciding,  
although I would recommend for it.

Thanks again,

Neil Mahoney
#include <std/disclaimer.h>


Quote:> Hi,

%<--- snip --->%

> I can't figure out how to get lint to work for C++ files. The man pages  
> in AnswerBook all use phrases like 'linting a C program'. Using lint,  
> even from the command line (avoiding any make-osities), with a file that  
> is not a .c extension, produces an error.

> Can this really be?! No lint for C++?

%<--- snip --->%