Re: [Boost-bugs] [Boost C++ Libraries] #1130: GCC -wundef warnings

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1130: GCC -wundef warnings
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-21 09:43:19


#1130: GCC -wundef warnings
-------------------------------+--------------------------------------------
  Reporter: anonymous | Owner:
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: None
   Version: Boost 1.34.1 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by andyc_at_[hidden]):

 I notice that this problem has been discussed previously on
 <http://lists.boost.org/Archives/boost/2005/10/95850.php> and there's a
 proposal to do with BoostConfig referenced there:
 <http://www.crystalclearsoftware.com/cgi-
 bin/boost_wiki/wiki.pl?BoostConfig>.

 I also notice that that's proposing using constructs such as:

   // Comeau C++
   #ifndef BOOST_CXX_COMO
   #define BOOST_CXX_COMO 0
   #endif

 I wonder if you could use this instead:

   # define BOOST_WORKAROUND(symbol, test) \
         ((BOOST_COMPILER_DEFINED_ ## symbol) && \
          (symbol != 0) && (1 % (( (symbol test) ) + 1)))

 and you could then define

   #define BOOST_COMPILER_DEFINED_BOOST_MSVC defined(BOOST_MSVC)

 for each macro used in a BOOST_WORKAROUND expansion rather than all those
 #ifndefs. Just a thought. (I also did wonder whether there was some
 preprocessor magic to save having to define all those by hand but I
 couldn't come up with any).

 Until this problem is resolved in an official boost release, that's what
 we're intending to do so that we can compile with -Wundef.

 --
 Andy, BlueArc Engineering

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1130#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC