This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12629] name leaks
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2003 11:32:47 -0000
- Subject: [Bug c++/12629] name leaks
- References: <20031015224509.12629.yujie.wu@hec.utah.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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