This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 3.0.1: uninitialized int != 0
- To: Markus Werle <numerical dot simulation at web dot de>
- Subject: Re: g++ 3.0.1: uninitialized int != 0
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Wed, 22 Aug 2001 11:28:07 +0200
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <3B837591.F5AA17F0@web.de>
- Reply-To: martin dot kahlert at infineon dot com
On Wed, Aug 22, 2001 at 11:04:17AM +0200, Markus Werle wrote:
> The integer k below does not default to zero with gcc-3.0.1
> (Monday's version)
> With gcc-3.0 this code here is OK.
Why should it? In C (and i assume in C++, too) only static
variables (and globals defined outside any funtion)
are initialized by 0. Assuming anything more is a bug
inside your code.
Greetings,
Martin.
--
The early bird catches the worm. If you want something else for
breakfast, get up later.