473,513 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cl command for lint/splint

Hello,
gnu g++ offers something similar to lint/splint for statically checking
C programs with the following command:

g++ -W -Wall -Wshadow -Wwrite-strings -Wold-style-cast
-Woverloaded-virtual -pedantic -Os -fno-exceptions -c

does cl.exe in windows offer something similar?

Thanks.
Aug 18 '07 #1
1 2351
on********@yahoo.com wrote:
Hello,
gnu g++ offers something similar to lint/splint for statically
checking C programs with the following command:

g++ -W -Wall -Wshadow -Wwrite-strings -Wold-style-cast
-Woverloaded-virtual -pedantic -Os -fno-exceptions -c

does cl.exe in windows offer something similar?
cl -Wall -Zs

....would be a good place to start. You'll get more errors/warnings if you
remove -Zs (syntax check only) and let the compiler generate an OBJ file
since many warnings/errors are raised in the compiler back end. You'll
frequently get warnings from an optimized build that you don't get from a
debug build as well.

If you have Visual Studio team system, you can use

cl -analyze

to do extensive static checking on the code.

-cd
Aug 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
707
by: Greg Roberts | last post by:
We have a large code base, mainly C but with some C++ which we wish to check for existing issues in an effort to be proactive. I have downloaded the open source GLINT program but am having big...
6
5461
by: Dom Gilligan | last post by:
Does anyone know of a C++ lint, preferably free? I've inherited a large code base and need to remove some unused functions. What I've found so far: gcc -O2 does *not* check for unused functions...
2
292
by: Brian | last post by:
I am new to lint and have been experimenting with splint. An initialization problem I was caught on recently was not found by splint. Would pc-lint catch this problem: /* test program for splint...
2
5166
by: Guy Eschemann | last post by:
When running the following code through splint, I get two warnings that I don't fully understand. This is the code : --- typedef struct { int *pData; } t_MyStruct;
9
5341
by: Henry Fr?d?ric | last post by:
I am currently working in Aisin-AW, in development of navigation systems (embedded SW). Since a few weeks, we are checking our source code with splint. We encounter this problem. I hope this...
4
408
by: Sathyaish | last post by:
I just re-read about lint as a passing reference in a general programming article. I am curious. Where can I download lint from? Is it downloadable for free? I googled but got some link to SLint or...
12
2538
by: spibou | last post by:
I have two identical files , u1.c and u2.c which only contain the line typedef int Q ; When I issue "splint u1.c u2.c" I get u2.c:1:13: Datatype Q defined more than once A function or variable...
2
2592
by: Peter Bencsik | last post by:
Hi, does anybody has experience with static source code checker for C? I am thinking of choosing splint as my favorite tool, is this a good choice? regards, pb
3
4406
by: copx | last post by:
I saw one here posting the output of a lint tool in a thread, and that made me wonder whether using such tools are still useful. I mean, modern compilers are lint tools themselves, the list of...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.