This is the mail archive of the gcc-patches@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]

Re: cpplib: basename () fix



"back when" we talked about libiberty documentation.  One of the
things that would be documented is what functionality you *can* rely
on in functions such as basename, where we use the libc version if it
has one.  Such documentation would then indicate that calling basename
with an empty string or empty final component is not well defined.

If we wanted to be anal about it, we could modify our implementation
to abort if you passed it a parameter that caused undefined behavior.
Then we'd be sure that people using such functions aren't going to be
surprised later.

I wouldn't recommend "gcc_" as a prefix, because libiberty is used in
a lot of things other than gcc.  "gnu_" would be better, but
"libiberty_" would be more precise.


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