Bug #562

Revision 6519 breaks Core on Linux

Added by Jan Dolinár over 10 years ago. Updated over 10 years ago.

Status:RejectedStart date:11/03/2013
Priority:HighDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CoreSpent time:-
Target version:-

Description

Both GCC and Clang compilers are affected.

With Clang 3.3:

----- Core ( MT SSE2 GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX )
BLITZ: Cpu.cpp Mt.cpp sheap.cpp String.cpp WString.cpp StrUtil.cpp Bom.cpp Path.cpp NetNode.cpp App.cpp Stream.cpp Blo
    ckStream.cpp FilterStream.cpp Log.cpp Debug.cpp Ini.cpp Util.cpp mathutil.cpp LocalProcess.cpp Vcont.cpp Hash.cpp Call
    back.cpp TimeDate.cpp Value.cpp Format.cpp Convert.cpp Color.cpp Gtypes.cpp t.cpp Lang.cpp LangInfo.cpp parser.cpp XML
    .cpp Xmlize.cpp JSON.cpp Uuid.cpp Ptr.cpp z.cpp Topic.cpp CoWork.cpp MD5.cpp SHA1.cpp InetUtil.cpp Socket.cpp Http.cpp
     Dli.cpp Win32Util.cpp
In file included from /home/h/.upp.out/watchdog/Core/CLANG.Debug.Debug_Full.Mt.Shared.Sse2/$blitz.cpp:3:
In file included from /home/h/upp-production/uppsrc/Core/Cpu.cpp:1:
In file included from /home/h/upp-production/uppsrc/Core/Core.h:244:
/home/h/upp-production/uppsrc/Core/Defs.h:436:55: error: no member named 'IsNullInstance' in 'Upp::Ref'
template <class T> bool IsNull(const T& x) { return x.IsNullInstance(); }
                                                    ~ ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:95:70: note: in instantiation of function template specialization 'Upp:
    :IsNull<Upp::Ref>' requested here
        virtual bool  IsNull(const void *p) const             { return UPP::IsNull(*(T *) p); }
                                                                            ^
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<Upp::Ref>::IsN
    ull' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<Upp::Ref> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:153:59: note: in instantiation of function template specialization 'Upp
    ::Ref::Ref<Upp::Ref>' requested here
inline String&  RefString(Ref f)  { return GetRef<String>(f); } // Deprecated, use Ref::Get<T>
                                                          ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:43: error: assigning to 'void *' from incompatible type 'const Upp:
    :Value *'
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                 ^ ~~
/home/h/upp-production/uppsrc/Core/ValueUtil.h:96:69: note: in instantiation of function template specialization 'Upp:
    :Ref::Ref<const Upp::Value>' requested here
        virtual void  SetValue(void *p, const Value& v) const { *(T *) p = (T)v; }
                                                                           ^
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<Upp::Ref>::Set
    Value' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<Upp::Ref> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:153:59: note: in instantiation of function template specialization 'Upp
    ::Ref::Ref<Upp::Ref>' requested here
inline String&  RefString(Ref f)  { return GetRef<String>(f); } // Deprecated, use Ref::Get<T>
                                                          ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:96:67: error: no viable overloaded '='
        virtual void  SetValue(void *p, const Value& v) const { *(T *) p = (T)v; }
                                                                ~~~~~~~~ ^ ~~~~
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<const Upp::Val
    ue>::SetValue' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<const Upp::Value> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:96:69: note: in instantiation of function template specialization 'Upp:
    :Ref::Ref<const Upp::Value>' requested here
        virtual void  SetValue(void *p, const Value& v) const { *(T *) p = (T)v; }
                                                                           ^
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<Upp::Ref>::Set
    Value' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<Upp::Ref> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:153:59: note: in instantiation of function template specialization 'Upp
    ::Ref::Ref<Upp::Ref>' requested here
inline String&  RefString(Ref f)  { return GetRef<String>(f); } // Deprecated, use Ref::Get<T>
                                                          ^
/home/h/upp-production/uppsrc/Core/Value.cpp:31:15: note: candidate function not viable: 'this' argument has type 'con
    st Upp::Value', but method is not marked const
Value& Value::operator=(const Value& v) {
              ^
In file included from /home/h/.upp.out/watchdog/Core/CLANG.Debug.Debug_Full.Mt.Shared.Sse2/$blitz.cpp:3:
In file included from /home/h/upp-production/uppsrc/Core/Cpu.cpp:1:
In file included from /home/h/upp-production/uppsrc/Core/Core.h:244:
/home/h/upp-production/uppsrc/Core/Defs.h:434:43: error: no viable overloaded '='
template <class T> void SetNull(T& x) { x = Null; }
                                        ~ ^ ~~~~
/home/h/upp-production/uppsrc/Core/ValueUtil.h:97:63: note: in instantiation of function template specialization 'Upp:
    :SetNull<const Upp::Value>' requested here
        virtual void  SetNull(void *p) const                  { UPP::SetNull(*(T *)p); }
                                                                     ^
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<const Upp::Val
    ue>::SetNull' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<const Upp::Value> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:96:69: note: in instantiation of function template specialization 'Upp:
    :Ref::Ref<const Upp::Value>' requested here
        virtual void  SetValue(void *p, const Value& v) const { *(T *) p = (T)v; }
                                                                           ^
/home/h/upp-production/uppsrc/Core/Other.h:5:12: note: in instantiation of member function 'Upp::StdRef<Upp::Ref>::Set
    Value' requested here
                static T o;
                         ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:54: note: in instantiation of function template specialization 'Upp
    ::Single<Upp::StdRef<Upp::Ref> >' requested here
        Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                                            ^
/home/h/upp-production/uppsrc/Core/ValueUtil.h:153:59: note: in instantiation of function template specialization 'Upp
    ::Ref::Ref<Upp::Ref>' requested here
inline String&  RefString(Ref f)  { return GetRef<String>(f); } // Deprecated, use Ref::Get<T>
                                                          ^
/home/h/upp-production/uppsrc/Core/Value.cpp:31:15: note: candidate function not viable: 'this' argument has type 'con
    st Upp::Value', but method is not marked const
Value& Value::operator=(const Value& v) {
              ^
4 errors generated.

With GCC 4.8.2:

----- Core ( MT SSE2 GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX )
BLITZ: Cpu.cpp Mt.cpp sheap.cpp String.cpp WString.cpp StrUtil.cpp Bom.cpp Path.cpp NetNode.cpp App.cpp Stream.cpp Blo
    ckStream.cpp FilterStream.cpp Log.cpp Debug.cpp Ini.cpp Util.cpp mathutil.cpp LocalProcess.cpp Vcont.cpp Hash.cpp Call
    back.cpp TimeDate.cpp Value.cpp Format.cpp Convert.cpp Color.cpp Gtypes.cpp t.cpp Lang.cpp LangInfo.cpp parser.cpp XML
    .cpp Xmlize.cpp JSON.cpp Uuid.cpp Ptr.cpp z.cpp Topic.cpp CoWork.cpp MD5.cpp SHA1.cpp InetUtil.cpp Socket.cpp Http.cpp
     Dli.cpp Win32Util.cpp
In file included from /home/h/upp-production/uppsrc/Core/Core.h:244:0,
                 from /home/h/upp-production/uppsrc/Core/Cpu.cpp:1,
                 from /home/h/.upp.out/watchdog/Core/GCC.Debug.Debug_Full.Mt.Shared.Sse2/$blitz.cpp:3:
/home/h/upp-production/uppsrc/Core/Defs.h: In instantiation of 'bool Upp::IsNull(const T&) [with T = Upp::Ref]':
/home/h/upp-production/uppsrc/Core/ValueUtil.h:95:85:   required from 'bool Upp::StdRef<T>::IsNull(const void*) const 
    [with T = Upp::Ref]'
/home/h/upp-production/uppsrc/Core/Win32Util.cpp:235:1:   required from here
/home/h/upp-production/uppsrc/Core/Defs.h:436:70: error: 'const class Upp::Ref' has no member named 'IsNullInstance'
 template <class T> bool IsNull(const T& x) { return x.IsNullInstance(); }
                                                                      ^
In file included from /home/h/upp-production/uppsrc/Core/Core.h:292:0,
                 from /home/h/upp-production/uppsrc/Core/Cpu.cpp:1,
                 from /home/h/.upp.out/watchdog/Core/GCC.Debug.Debug_Full.Mt.Shared.Sse2/$blitz.cpp:3:
/home/h/upp-production/uppsrc/Core/ValueUtil.h: In instantiation of 'Upp::Ref::Ref(T&) [with T = const Upp::Value]':
/home/h/upp-production/uppsrc/Core/ValueUtil.h:96:67:   required from 'void Upp::StdRef<T>::SetValue(void*, const Upp:
    :Value&) const [with T = Upp::Ref]'
/home/h/upp-production/uppsrc/Core/Win32Util.cpp:235:1:   required from here
/home/h/upp-production/uppsrc/Core/ValueUtil.h:130:43: error: invalid conversion from 'const void*' to 'void*' [-fperm
    issive]
  Ref(T& x)                          { ptr = &x; m = &Single< StdRef<T> >(); }
                                           ^

ValueUtil.patch Magnifier (1.9 KB) Jan Dolinár, 11/03/2013 10:07 PM

History

#1 Updated by Jan Dolinár over 10 years ago

This patch (created against 6523, before the revert) solves the problem for me, both in GCC and Clang.

#2 Updated by Miroslav Fidler over 10 years ago

  • Status changed from Patch ready to Rejected

Also available in: Atom PDF