Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

warning: "nullptr" redefined when compile sdk\mozilla_chardet\src\nsSBCSGroupPro

(1/2) > >>

ollydbg:

--- Code: ----------------- Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 50.0%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs\include -I.objs\include -I. -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\include -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Isdk\wxpropgrid\include -c sdk\mozilla_chardet\src\nsSBCSGroupProber.cpp -o .objs\sdk\mozilla_chardet\src\nsSBCSGroupProber.o
In file included from include/sdk_events.h:12:0,
                 from include/manager.h:21,
                 from include/configmanager.h:17,
                 from sdk\mozilla_chardet\src\nsSBCSGroupProber.cpp:10:
include/prep.h:41:0: warning: "nullptr" redefined [enabled by default]
In file included from sdk\mozilla_chardet\src\nsSBCSGroupProber.cpp:8:0:
include\mozilla_chardet\mfbt/mozilla/NullPtr.h:40:0: note: this is the location of the previous definition


--- End code ---

When look at this code in nsSBCSGroupProber.cpp


--- Code: ---#include <stdio.h>
#include "prmem.h"
#include "mozilla/NullPtr.h"

#include "configmanager.h"

#include "nsSBCharSetProber.h"
#include "nsSBCSGroupProber.h"
--- End code ---

In mozilla/NullPtr.h, it has:

--- Code: ---#ifndef MOZ_HAVE_CXX11_NULLPTR
#  if defined(__GNUC__)
#    define nullptr __null   //******************** line 40
#  elif defined(_WIN64)
#    define nullptr 0LL
#  else
#    define nullptr 0L
#  endif
#endif

--- End code ---




MortenMacFly:
I wouldn't touch that now if not absolutely needed. I've an update for the Mozilla component after 13/12. hen we'll see if this is still an issue...

ollydbg:

--- Quote from: MortenMacFly on December 25, 2013, 10:51:17 am ---I wouldn't touch that now if not absolutely needed. I've an update for the Mozilla component after 13/12. hen we'll see if this is still an issue...

--- End quote ---

It's still an issue. (I build the latest svn head rev 9544, against wx30 C::B project, MinGW-Build GCC 4.7.3dw2)

Also, some other warnings like:

--- Code: ---[ 29.8%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -IE:\code\wx\wxWidgets-3.0.0\include -IE:\code\wx\wxWidgets-3.0.0\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c sdk\editorbase.cpp -o .objs30\sdk\editorbase.o
In file included from include/cbauibook.h:10:0,
                 from sdk\editorbase.cpp:26:
E:\code\wx\wxWidgets-3.0.0\include/wx/aui/auibook.h:349:18: warning: 'virtual bool wxAuiNotebook::AddPage(wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
In file included from sdk\editorbase.cpp:26:0:
include/cbauibook.h:132:14: warning:   by 'bool cbAuiNotebook::AddPage(wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
In file included from include/cbauibook.h:10:0,
                 from sdk\editorbase.cpp:26:
E:\code\wx\wxWidgets-3.0.0\include/wx/aui/auibook.h:352:18: warning: 'virtual bool wxAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
In file included from sdk\editorbase.cpp:26:0:
include/cbauibook.h:147:14: warning:   by 'bool cbAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]

--- End code ---

MortenMacFly:
OK, then we probably should sure that MOZ_HAVE_CXX11_NULLPTR is defined:

Either by locking what leads to the fact it is not and adjusting it
...or by simply defining it. :-)

Thats the relvant part:

--- Code: ---#elif defined(__GNUC__)
#  if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
#    if MOZ_GCC_VERSION_AT_LEAST(4, 6, 0)
#      define MOZ_HAVE_CXX11_NULLPTR
#    endif
#  endif
#elif defined(_MSC_VER) && _MSC_VER >= 1600

--- End code ---

...one condition is false. The question is: Which one?

stahta01:
This line is likely false under Windows cbp compiles.


--- Code: ---if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L

--- End code ---

Are we allowed to set a -std=gnu++11 to fix the problem under windows.
I ask because I read that we were NOT going to a higher C++ Standard under Linux.

Note: Using "-std=gnu++11" results in a even more annoying warning.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version