libsupc++ nit picks
Kenny Simpson
theonetruekenny@yahoo.com
Thu Jan 3 15:17:00 GMT 2002
Hi,
first off, not sure if this should be libstdc++ or
gcc, but here goes:
In libsupc++ I see the idiom:
if (ptr)
free (ptr)
used in a few places ( del_op.cc:38, del_opnt.cc:38,
eh_globals.cc:51 )
, but from the UNIX man pages:
http://www.opengroup.org/cgi-bin/dbcgix?TPL=sud2/xsh/free==FAQBD=1==1
and Linux man pages
it is stated that free(0) does nothing, thus making
this
'if' redundant.
I also found the C rational here:
http://www.lysator.liu.se/c/rat/d10.html#4-10-3-2
Also, the use of qualified names, usings, and extern
vs #include seem inconsistent.
To use the above example again, del_op.cc and
del_opnt.cc refer to ::free, where eh_globals.cc uses
std::free.
del_op.cc uses an extern to find free, where
eh_globals.cc #include <cstdlib>
new_handle.cc uses std:: for some names
(std::nothrow_t), but usings for others
(std::new_handler).
Is this just a result of many different authors?
Should this part of the library fall under the same
coding rules as the rest?
-Kenny
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
More information about the Libstdc++
mailing list