[Dune] [#1101] nullptr test fails if configureflags include -Werror

Dune flyspray at dune-project.org
Thu May 10 14:13:36 CEST 2012


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Matthias Wohlmuth (matthias) 

Attached to Project - Dune
Summary - nullptr test fails if configureflags include -Werror
Task Type - Bug Report
Category - Common
Status - New
Assigned To - 
Operating System - Linux
Severity - Low
Priority - Low
Reported Version - SVN (pre2.3)
Due in Version - Undecided
Due Date - Undecided
Details - The current implementation of the nullptr check results in an unused variable warning. Thus, if Dune is configured with -Werror, the build system claims that there is no nullptr implementation present and adds the fallback implementation in dune/common/nullptr.h . However, if it is present in one of the system includes, this causes a compiler error because of two colliding nullptr implementations (system and fallback). 
So I propose to fix the unused variable warning, for example by the following patch:

--- cxx0x_nullptr.m4    (revision 6709)                                                                                                                                                   
+++ cxx0x_nullptr.m4    (working copy)                                                                                                                                                    
@@ -5,6 +5,7 @@                                                                                                                                                                           
     AC_LANG_PUSH([C++])                                                                                                                                                                  
     AC_TRY_COMPILE([],[
       char* ch = nullptr;
+      if(ch!=nullptr) { ; }
       ], 
       dune_cv_nullptr_support=yes,
       dune_cv_nullptr_support=no)


More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=1101

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list