By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,369 Members | 1,538 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,369 IT Pros & Developers. It's quick & easy.

Detection of unitialized member variables

P: n/a
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

Oct 24 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
to****@gmail.com 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

Oct 24 '05 #2

P: n/a

to****@gmail.com 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

Oct 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.