Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1197 closed Bugs (fixed)

patch: boost/function/function_base.hpp fails to compile with gcc -Wundef if BOOST_STRICT_CONFIG is not defined

Reported by: andyc@… Owned by: Douglas Gregor
Milestone: To Be Determined Component: function
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

With gcc -Wundef, we get a compile error:

.../boost/function/function_base.hpp:62:7: warning: "BOOST_STRICT_CONFIG" is not defined

The following patch fixes it:

===== boost/function/function_base.hpp 1.1 vs edited =====
--- 1.1/boost/function/function_base.hpp        2007-08-17 11:57:51 +01:00
+++ edited/boost/function/function_base.hpp     2007-08-21 10:52:10 +01:00
@@ -59,7 +59,7 @@
 
 #if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)                    \
  || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)                         \
- || !(BOOST_STRICT_CONFIG || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
+ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
 #  define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
 #endif
 

Change History (3)

comment:1 by René Rivera, 15 years ago

Component: Nonefunction
Owner: set to Douglas Gregor

comment:2 by Douglas Gregor, 15 years ago

Resolution: fixed
Status: newclosed

(In [38827]) Committed patch to eliminate warnings with GCC's -Wundef. Fixes #1197

comment:3 by andyc@…, 14 years ago

it's not fixed in 1_36_0. Here's the patch to fix it:

boost/function/function_base.hpp 1.1 vs edited

--- 1.1/boost/function/function_base.hpp 2008-10-30 16:15:10 +00:00 +++ edited/boost/function/function_base.hpp 2008-10-31 10:04:29 +00:00 @@ -74,7 +74,7 @@

#if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \

defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
+
!(BOOST_STRICT_CONFIG !defined(SUNPRO_CC) SUNPRO_CC > 0x540)
!(defined(BOOST_STRICT_CONFIG) !defined(SUNPRO_CC) SUNPRO_CC > 0x540)

# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX #endif

Note: See TracTickets for help on using tickets.