freebsd-ports/math/freefem/files/patch-freefem::fem::femParser.cpp
Sergey A. Osokin cb74841678 Fix building under -CURRENT (gcc 3.3) by update to 3.5.7 [1]
Sort and use %%EXAMPLESDIR%% and %%DOCSDIR%% for pkg-plist [2]

Submitted by:	Simon Barner <barner@in.tum.de> [1], osa [2]
2003-07-21 13:43:38 +00:00

15 lines
647 B
C++

--- freefem/fem/femParser.cpp.orig Thu Oct 25 00:49:36 2001
+++ freefem/fem/femParser.cpp Mon Jul 21 13:32:54 2003
@@ -2913,7 +2913,10 @@
for( k =0; k<3*__mesh.getNumberOfCells();k++) (s->name)->table[k] = 0;
}
else
- { (s->name)->table = new creal[__mesh.getNumberOfPoints()];
+ { // This is in order to avoid an internal compiler error
+ // with gcc 2.95.4 (FreeBSD)
+ int n = __mesh.getNumberOfPoints();
+ (s->name)->table = new creal[n];
for( k =0; k<__mesh.getNumberOfPoints();k++) (s->name)->table[k] = 0;
}
}