Code:
/tmp/diehard-1.1/src> make linux
g++ -finline-functions -static -malign-double -pipe -march=corei7 -O3 -fomit-frame-pointer -DNDEBUG -I. -D_REENTRANT=1 -DDIEHARD_REPLICATED=0 -DDIEHARD_MULTITHREADED=1 -shared libdiehard.cpp -Bsymbolic -o libdiehard.so -ldl -lpthread
libdiehard.cpp:19:12: warning: declaration ‘class std::bad_alloc’ does not declare anything [enabled by default]
In file included from diehardheap.h:23:0,
from libdiehard.cpp:34:
randomheap.h: In static member function ‘static void RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::Initializer<Index>::run(char*) [with int Index = 19, int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’:
staticforloop.h:24:5: recursively instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 2, int Iterations = 45, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
staticforloop.h:24:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 1, int Iterations = 46, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
randomheap.h:106:5: instantiated from ‘RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::RandomHeap() [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’
diehardheap.h:136:7: instantiated from ‘static void DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::Initializer<index>::run(void*) [with int index = 0, int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
staticforloop.h:21:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 0, int Iterations = 14, C = DieHardHeap<4, 3, 65536, false>::Initializer, V = void*]’
diehardheap.h:58:5: instantiated from ‘DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::DieHardHeap() [with int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
combineheap.h:8:7: instantiated from ‘ReentrantHeap<Super, BufferSize>::ReentrantHeap() [with Super = CombineHeap<DieHardHeap<4, 3, 65536, false>, TheLargeHeap>, int BufferSize = 65536]’
lockheap.h:10:7: instantiated from here
randomheap.h:207:7: warning: integer overflow in expression [-Woverflow]
randomheap.h:207:7: error: overflow in constant expression [-fpermissive]
randomheap.h:207:7: note: in template argument for type ‘int’
randomheap.h: In static member function ‘static void RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::Initializer<Index>::run(char*) [with int Index = 20, int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’:
staticforloop.h:24:5: recursively instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 2, int Iterations = 45, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
staticforloop.h:24:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 1, int Iterations = 46, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
randomheap.h:106:5: instantiated from ‘RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::RandomHeap() [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’
diehardheap.h:136:7: instantiated from ‘static void DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::Initializer<index>::run(void*) [with int index = 0, int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
staticforloop.h:21:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 0, int Iterations = 14, C = DieHardHeap<4, 3, 65536, false>::Initializer, V = void*]’
diehardheap.h:58:5: instantiated from ‘DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::DieHardHeap() [with int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
combineheap.h:8:7: instantiated from ‘ReentrantHeap<Super, BufferSize>::ReentrantHeap() [with Super = CombineHeap<DieHardHeap<4, 3, 65536, false>, TheLargeHeap>, int BufferSize = 65536]’
lockheap.h:10:7: instantiated from here
randomheap.h:207:7: warning: integer overflow in expression [-Woverflow]
randomheap.h:207:7: error: overflow in constant expression [-fpermissive]
randomheap.h:207:7: note: in template argument for type ‘int’
randomheap.h: In static member function ‘static void RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::Initializer<Index>::run(char*) [with int Index = 21, int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’:
staticforloop.h:24:5: recursively instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 2, int Iterations = 45, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
staticforloop.h:24:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 1, int Iterations = 46, C = RandomHeap<4, 3, 8ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
randomheap.h:106:5: instantiated from ‘RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::RandomHeap() [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 8ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’
diehardheap.h:136:7: instantiated from ‘static void DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::Initializer<index>::run(void*) [with int index = 0, int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
staticforloop.h:21:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 0, int Iterations = 14, C = DieHardHeap<4, 3, 65536, false>::Initializer, V = void*]’
diehardheap.h:58:5: instantiated from ‘DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::DieHardHeap() [with int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
combineheap.h:8:7: instantiated from ‘ReentrantHeap<Super, BufferSize>::ReentrantHeap() [with Super = CombineHeap<DieHardHeap<4, 3, 65536, false>, TheLargeHeap>, int BufferSize = 65536]’
lockheap.h:10:7: instantiated from here
randomheap.h:207:7: warning: integer overflow in expression [-Woverflow]
randomheap.h:207:7: error: overflow in constant expression [-fpermissive]
randomheap.h:207:7: note: in template argument for type ‘int’
randomheap.h: In static member function ‘static void RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap,
[...]
diehardheap.h:58:5: instantiated from ‘DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::DieHardHeap() [with int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
combineheap.h:8:7: instantiated from ‘ReentrantHeap<Super, BufferSize>::ReentrantHeap() [with Super = CombineHeap<DieHardHeap<4, 3, 65536, false>, TheLargeHeap>, int BufferSize = 65536]’
lockheap.h:10:7: instantiated from here
randomheap.h:207:7: warning: left shift count >= width of type [enabled by default]
randomheap.h: In static member function ‘static void RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::Initializer<Index>::run(char*) [with int Index = 46, int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 65536ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’:
staticforloop.h:24:5: recursively instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 2, int Iterations = 45, C = RandomHeap<4, 3, 65536ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
staticforloop.h:24:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 1, int Iterations = 46, C = RandomHeap<4, 3, 65536ul, 65536ul, RandomMiniHeap, false>::Initializer, V = char*]’
randomheap.h:106:5: instantiated from ‘RandomHeap<Numerator, Denominator, ObjectSize, AllocationGrain, MiniHeap, DieFastOn>::RandomHeap() [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 65536ul, long unsigned int AllocationGrain = 65536ul, MiniHeap = RandomMiniHeap, bool DieFastOn = false]’
diehardheap.h:136:7: instantiated from ‘static void DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::Initializer<index>::run(void*) [with int index = 13, int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
staticforloop.h:24:5: recursively instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 1, int Iterations = 13, C = DieHardHeap<4, 3, 65536, false>::Initializer, V = void*]’
staticforloop.h:24:5: instantiated from ‘static void StaticForLoop<From, Iterations, C, V>::run(V) [with int From = 0, int Iterations = 14, C = DieHardHeap<4, 3, 65536, false>::Initializer, V = void*]’
diehardheap.h:58:5: instantiated from ‘DieHardHeap<Numerator, Denominator, MaxSize, DieFast>::DieHardHeap() [with int Numerator = 4, int Denominator = 3, int MaxSize = 65536, bool DieFast = false]’
combineheap.h:8:7: instantiated from ‘ReentrantHeap<Super, BufferSize>::ReentrantHeap() [with Super = CombineHeap<DieHardHeap<4, 3, 65536, false>, TheLargeHeap>, int BufferSize = 65536]’
lockheap.h:10:7: instantiated from here
randomheap.h:207:7: warning: left shift count >= width of type [enabled by default]
In file included from diehardheap.h:24:0,
from libdiehard.cpp:34:
randomminiheap.h: In member function ‘void* RandomMiniHeap<Numerator, Denominator, ObjectSize, NObjects, Allocator, DieFastOn>::malloc(size_t) [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 65536ul, int NObjects = -0x00000000080000000, Allocator = OneHeap<BumpAlloc<MmapAlloc, 4096> >, bool DieFastOn = false, size_t = long unsigned int]’:
libdiehard.cpp:200:1: instantiated from here
randomminiheap.h:102:55: warning: integer overflow in expression [-Woverflow]
randomminiheap.h: In member function ‘void RandomMiniHeap<Numerator, Denominator, ObjectSize, NObjects, Allocator, DieFastOn>::checkOverflowError(void*, int) const [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 65536ul, int NObjects = -0x00000000080000000, Allocator = OneHeap<BumpAlloc<MmapAlloc, 4096> >, bool DieFastOn = false]’:
randomminiheap.h:159:2: instantiated from ‘bool RandomMiniHeap<Numerator, Denominator, ObjectSize, NObjects, Allocator, DieFastOn>::free(void*) [with int Numerator = 4, int Denominator = 3, long unsigned int ObjectSize = 65536ul, int NObjects = -0x00000000080000000, Allocator = OneHeap<BumpAlloc<MmapAlloc, 4096> >, bool DieFastOn = false]’
libdiehard.cpp:200:1: instantiated from here
randomminiheap.h:234:5: warning: integer overflow in expression [-Woverflow]
randomheap.h: At global scope:
randomheap.h:36:25: warning: inline function ‘size_t RandomHeapBase<Numerator, Denominator>::getSize(void*) [with int Numerator = 4, int Denominator = 3, size_t = long unsigned int]’ used but never defined [enabled by default]
randomheap.h:34:25: warning: inline function ‘void* RandomHeapBase<Numerator, Denominator>::malloc(size_t) [with int Numerator = 4, int Denominator = 3, size_t = long unsigned int]’ used but never defined [enabled by default]
randomheap.h:35:23: warning: inline function ‘bool RandomHeapBase<Numerator, Denominator>::free(void*) [with int Numerator = 4, int Denominator = 3]’ used but never defined [enabled by default]
randomminiheap.h:34:23: warning: inline function ‘virtual bool RandomMiniHeapBase::free(void*)’ used but never defined [enabled by default]
randomminiheap.h:35:25: warning: inline function ‘virtual size_t RandomMiniHeapBase::getSize(void*)’ used but never defined [enabled by default]
randomminiheap.h:33:25: warning: inline function ‘virtual void* RandomMiniHeapBase::malloc(size_t)’ used but never defined [enabled by default]
make: *** [linux] Fehler 1
Bookmarks