This is the mail archive of the 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]
Other format: [Raw text]

Re: abs function question

> I am currently running into a problem with the function abs and the
> header std_cstdlib.h.  This file contains the lines:
>   namespace std
>   {
>	using ::abs
>   }
> The problem is that my system's stdlib.h header file is smart enough to
> not do an extern declaration for abs if it is in C++ mode and instead
> does an inline declaration of the abs function.  It only does an extern
> declaration if it is in C mode.  Thus I get an error on the 'using ::abs'
> line. [...proposed fix removed for the moment...]

Hi Steve,

Could I get some more information on this problem before we hack the
library or you add a fixinclude? ;-)

The line of code in question has been present since Jan 02.  How long
have you seen this problem on mainline?

Does the standard say that ``using ::abs'' will not pull an inline
into the new namespace scope exactly as it would an extern?  I'm
surprised to hear that.  I.e. the following compiles for me with

inline void a(void) {}

namespace std { using ::a; }

Thus, I'm wondering what is different in your case.  Could you post
for us the exact declaration found in your system's <stdlib.h> in C++


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