Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Detection of unitialized member variables

Reply
Thread Tools

Detection of unitialized member variables

 
 
toddel@gmail.com
Guest
Posts: n/a
 
      10-24-2005
Are there any compilers or 3rd party tools available that will detect
at compile time that a member variable has been declared but not
initialized? I know most compilers do this for local variables but we
are looking to detect member vars.

/Todd

 
Reply With Quote
 
 
 
 
mlimber
Guest
Posts: n/a
 
      10-24-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Are there any compilers or 3rd party tools available that will detect
> at compile time that a member variable has been declared but not
> initialized? I know most compilers do this for local variables but we
> are looking to detect member vars.
>
> /Todd


You may be able to get your compiler to do it by setting it at the
highest warning level, but there are several Lint programs that will do
that, too. PC-Lint/FlexeLint from Gimpel software (www.gimpel.com) are
a commercial example.

Cheers! --M

 
Reply With Quote
 
 
 
 
Greg
Guest
Posts: n/a
 
      10-24-2005

(E-Mail Removed) wrote:
> Are there any compilers or 3rd party tools available that will detect
> at compile time that a member variable has been declared but not
> initialized? I know most compilers do this for local variables but we
> are looking to detect member vars.
>
> /Todd


gcc 4.0 (and perhaps earlier versions) can issue such a warning.

Greg

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
using % operator to print possibly unitialized data attributes Adam Monsen Python 3 09-09-2005 10:40 PM
Unitialized variables Brad Perl Misc 1 09-03-2004 04:48 PM
Re: Unitialized Memory Read In sscanf() Eric Sosman C Programming 0 06-24-2003 08:03 PM
Re: Unitialized Memory Read In sscanf() Darrell Grainger C Programming 1 06-24-2003 06:52 PM



Advertisments