Bug#671991: grass: FTBFS: mm.cc:259:32: error: declaration of 'void* operator new [](size_t)' has a different exception specifier
Matthias Klose
doko at debian.org
Thu May 10 00:54:27 UTC 2012
and here is the complete patch, uploaded to delayed/2, part of the mysql transition.
-------------- next part --------------
diff -Nru grass-6.4.1/debian/changelog grass-6.4.1/debian/changelog
--- grass-6.4.1/debian/changelog 2012-01-20 14:49:23.000000000 +0100
+++ grass-6.4.1/debian/changelog 2012-05-10 01:43:33.000000000 +0200
@@ -1,3 +1,10 @@
+grass (6.4.1-2.1) unstable; urgency=low
+
+ * Non maintainer upload.
+ * Fix build failure with GCC 4.7. Closes: #671991.
+
+ -- Matthias Klose <doko at debian.org> Wed, 09 May 2012 23:40:21 +0000
+
grass (6.4.1-2) unstable; urgency=low
[ Hamish Bowman ]
diff -Nru grass-6.4.1/debian/patches/changeset_r50130.diff grass-6.4.1/debian/patches/changeset_r50130.diff
--- grass-6.4.1/debian/patches/changeset_r50130.diff 1970-01-01 01:00:00.000000000 +0100
+++ grass-6.4.1/debian/patches/changeset_r50130.diff 2012-05-10 02:33:48.000000000 +0200
@@ -0,0 +1,88 @@
+Index: grass-6.4.1/lib/iostream/mm.cc
+===================================================================
+--- grass-6.4.1.orig/lib/iostream/mm.cc 2012-05-10 02:14:07.528616045 +0200
++++ grass-6.4.1/lib/iostream/mm.cc 2012-05-10 02:15:08.000000000 +0200
+@@ -256,7 +256,7 @@
+
+
+ /* ************************************************************ */
+-void* operator new[] (size_t sz) {
++void* operator new[] (size_t sz) throw(std::bad_alloc) {
+ void *p;
+
+ MM_DEBUG cout << "new: sz=" << sz << ", register "
+@@ -307,7 +307,7 @@
+
+
+ /* ************************************************************ */
+-void* operator new (size_t sz) {
++void* operator new (size_t sz) throw(std::bad_alloc) {
+ void *p;
+
+ MM_DEBUG cout << "new: sz=" << sz << ", register "
+@@ -359,7 +359,7 @@
+
+
+ /* ---------------------------------------------------------------------- */
+-void operator delete (void *ptr) {
++void operator delete (void *ptr) throw() {
+ size_t sz;
+ void *p;
+
+@@ -399,7 +399,7 @@
+
+
+ /* ---------------------------------------------------------------------- */
+-void operator delete[] (void *ptr) {
++void operator delete[] (void *ptr) throw() {
+ size_t sz;
+ void *p;
+
+Index: grass-6.4.1/include/iostream/mm.h
+===================================================================
+--- grass-6.4.1.orig/include/iostream/mm.h 2008-12-19 21:29:33.000000000 +0100
++++ grass-6.4.1/include/iostream/mm.h 2012-05-10 02:15:08.000000000 +0200
+@@ -110,10 +110,10 @@
+ void print();
+
+ friend class mm_register_init;
+- friend void * operator new(size_t);
+- friend void * operator new[](size_t);
+- friend void operator delete(void *);
+- friend void operator delete[](void *);
++ friend void * operator new(size_t) throw(std::bad_alloc);
++ friend void * operator new[](size_t) throw(std::bad_alloc);
++ friend void operator delete(void *) throw();
++ friend void operator delete[](void *) throw();
+ };
+
+
+Index: grass-6.4.1/include/iostream/minmaxheap.h
+===================================================================
+--- grass-6.4.1.orig/include/iostream/minmaxheap.h 2010-04-17 14:15:22.000000000 +0200
++++ grass-6.4.1/include/iostream/minmaxheap.h 2012-05-10 02:33:36.668642093 +0200
+@@ -744,7 +744,7 @@
+ //heap must be empty
+ assert(this->size()==0);
+ for (i = 0; !full() && i<n; i++) {
+- insert(arr[i]);
++ this->insert(arr[i]);
+ }
+ if (i < n) {
+ assert(i == this->maxsize);
+@@ -777,13 +777,13 @@
+
+ if(old) {
+ HeapIndex n = this->size();
+- this->A = allocateHeap(this->maxsize); /* allocate a new array */
++ this->A = this->allocateHeap(this->maxsize); /* allocate a new array */
+ /* copy over the old values */
+ assert(this->maxsize > n);
+ for(HeapIndex i=0; i<=n; i++) { /* why extra value? -RW */
+ this->A[i] = old[i];
+ }
+- freeHeap(old); /* free up old storage */
++ this->freeHeap(old); /* free up old storage */
+ }
+
+ }
diff -Nru grass-6.4.1/debian/patches/series grass-6.4.1/debian/patches/series
--- grass-6.4.1/debian/patches/series 2012-01-20 14:49:23.000000000 +0100
+++ grass-6.4.1/debian/patches/series 2012-05-10 02:14:52.000000000 +0200
@@ -3,3 +3,4 @@
pager
xterm
instdir
+changeset_r50130.diff
More information about the Pkg-grass-devel
mailing list