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]
Other format: [Raw text]

[Bug c++/12629] name leaks


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12629



------- Additional Comments From gdr at integrable-solutions dot net  2003-10-18 11:32 -------
Subject: Re:  New: name leaks

"yujie dot wu at hec dot utah dot edu" <gcc-bugzilla@gcc.gnu.org> writes:

| Try the following program to reproduce the error:
| 
| #include <cstdlib>
| #include <cstdio>
|  
|  
| void exit( int a = 0 )
| {
|    std::puts( "dddddddd" );
|    std::exit( a );
| }

This program is invalid:  The reason is that the C funuction "exit"
may have a C linkage, in which case your definition invokes undefined
behaviour.  In fact, all C function in GNU C++ have C linkage.  

-- Gaby


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