bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'c++defs'


From: Bruno Haible
Subject: Re: new module 'c++defs'
Date: Sat, 6 Mar 2010 15:05:30 +0100
User-agent: KMail/1.9.9

John W. Eaton wrote:
> How can one easily find all the places where the GNULIB_NAMESPACE tag
> is needed?  Is there some way we can get the compiler to help with
> this job?

Good point. I'm adding a macro _GL_CXXALIASWARN, so that a warning will
be emitted:

  foo.cc: In function ‘int main()’:
  foo.cc:21: warning: call to ‘open’ declared with attribute warning: The 
symbol ::open refers to the system function. Use gnulib::open instead.

> Is there some reason to not add using directives in the gnulib
> headers for each system function that is placed in the gnulib::
> namespace?
> Oh, now I remember that doing this requires placing the system headers
> inside a namespace, and I guess that could cause some trouble.  But
> would you be interested in trying it?  I could do the testing and help
> with making the required changes.

You can try it. But I doubt that you will get to a portable solution
this way, because of differences between various C++ compilers.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]