[Bug c++/12629] name leaks
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Sat Oct 18 12:27:00 GMT 2003
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
More information about the Gcc-bugs
mailing list