This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1561: pointer not initialised to 0



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]