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



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