This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: Overloading vs. string functions, etc.



  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


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