This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/1561: pointer not initialised to 0
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1561: pointer not initialised to 0
- From: david at davidpashley dot com
- Date: 5 Jan 2001 16:06:15 -0000
- Reply-To: david at davidpashley dot com
>Number: 1561
>Category: c++
>Synopsis: pointer not initialised to 0
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Jan 05 08:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: david@davidpashley.com
>Release: gcc version 2.95.3 20001229 (prerelease)
>Organization:
>Environment:
debian woody Jan 5 2000
>Description:
root% cat c.cc
#include <assert.h>
int *a;
int main
()
{
int *b;
assert (a==0);
assert (b==0);
exit(0);
}
root% g++ c.cc
root% ./a.out
a.out: c.cc:11: int main(): Assertion `b==0' failed.
Aborted
root%
I think both the assertions should pass
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: