g++ 3.0.1: uninitialized int != 0
Martin Kahlert
martin.kahlert@infineon.com
Wed Aug 22 02:28:00 GMT 2001
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.
More information about the Gcc-bugs
mailing list