BIND 10 #2175: warning ... type uses the anonymous namespace

BIND 10 Development do-not-reply at isc.org
Mon Aug 6 07:57:21 UTC 2012


#2175: warning ... type uses the anonymous namespace
-------------------------------------+-------------------------------------
                   Reporter:  jreed  |                 Owner:
                       Type:         |                Status:  new
  defect                             |             Milestone:  New Tasks
                   Priority:         |            Resolution:
  medium                             |             Sensitive:  0
                  Component:         |           Sub-Project:  DNS
  Unclassified                       |  Estimated Difficulty:  0
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by naokikambe):

 Is the g++ bug this? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365
 In my environment which can produce such warnings, that workaround seemed
 to work properly.
 {{{
 configure:15941: checking for in-TU anonymous namespace breakage
 configure:15955: g++ -c -g -O2 -Wall -Wextra -Wwrite-strings -Woverloaded-
 virtual -Wno-sign-compare -Werror  conftest.cpp >&5
 cc1plus: warnings being treated as errors
 conftest.cpp:25: warning: 'isc::Bar' has a field 'isc::Bar::foo_' whose
 type uses the anonymous namespace
 configure:15955: $? = 1
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "bind10-devel"
 | #define PACKAGE_TARNAME "bind10-devel"
 | #define PACKAGE_VERSION "20120712"
 | #define PACKAGE_STRING "bind10-devel 20120712"
 | #define PACKAGE_BUGREPORT "bind10-dev at isc.org"
 | #define PACKAGE_URL ""
 | #define PACKAGE "bind10-devel"
 | #define VERSION "20120712"
 | #define STDC_HEADERS 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_MEMORY_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_DLFCN_H 1
 | #define LT_OBJDIR ".libs/"
 | #define HAVE_PYTHON_H 1
 | /* end confdefs.h.  */
 | namespace { class Foo {}; }
 |    namespace isc {class Bar {Foo foo_;};}
 | int
 | main ()
 | {
 |
 |   ;
 |   return 0;
 | }
 configure:15961: result: yes}}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/2175#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list