Overloading vs. string functions, etc.

Mark Mitchell mark@codesourcery.com
Thu May 24 12:52:00 GMT 2001


  Yes.  Or something like

     #undef strcpy
     extern char *strcpy(...);

That case is harmless; that's as if we didn't define the macro at all.
In other words, we will get results that are no *worse*.  I'm looking
for an easy solution that will help on some of our major platforms,
and not hurt on the less major platforms.

  The two hosts I have access to (a solaris and a gnu/linux) don't seem
  to protect against macro expansion; but I can't conclude anything since
  experience has proved that they are not representative in trickyness :-)

Good.  I will check a few others.

  A more serious problem is macro-redefinition.  A host is free to
  provide both function and macro definitions.

Good point.  I will check on whether or not we issue a diagnostic in
such cases.  As you say, as long as we do not issue a diagnostic, we
will have made things no worse, at least.

In retrospect, the ANSI/ISO C++ committee might have come up with a
way to make this stuff easier. :-)

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Libstdc++ mailing list