This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in sample code in the gcc manual
- From: David Bristow <dbristow at cybercom dot net>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 00:48:26 -0500
- Subject: Bug in sample code in the gcc manual
There is a small bug in the example code demonstrating the difference in
output between __FUNCTION__ and __PRETTY_FUNCTION__ in the "Function Names
as Strings" section of the C extensions chapter of the gcc manual. The code
as written does not compile -- the "a::sub(int i)" member function is
missing a return type, giving an error (from the RH8 gcc-3.2-7, but it looks
like it's a fairly generic error):
ISO C++ forbids declaration of `sub' with no type
The documentation on your web site of the latest release of gcc still lists
the example code with the above error, it's not just in what came with
gcc-3.2-7.
You guys are really doing a pretty good job, keep it up.
--
David Bristow
dbristow at cybercom dot net