[MOAB-dev] r2156 - in MOAB/trunk: . m4 parallel tools/tagprop

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Mon Oct 20 14:46:28 CDT 2008


Author: kraftche
Date: 2008-10-20 14:46:28 -0500 (Mon, 20 Oct 2008)
New Revision: 2156

Modified:
   MOAB/trunk/MBAdaptiveKDTree.hpp
   MOAB/trunk/configure.in
   MOAB/trunk/m4/compiler.m4
   MOAB/trunk/m4/hdf5.m4
   MOAB/trunk/parallel/MBParallelComm.cpp
   MOAB/trunk/tools/tagprop/parse.cpp
Log:
- Add '-pedantic' flag when compiling with gcc/g++
- Fix build errors when compiling with '-pedantic'
- Add work-around for g++ exiting with error due to use of 'long long'
  type in HDF5 headers when compiling with '-pedantic'.
  


Modified: MOAB/trunk/MBAdaptiveKDTree.hpp
===================================================================
--- MOAB/trunk/MBAdaptiveKDTree.hpp	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/MBAdaptiveKDTree.hpp	2008-10-20 19:46:28 UTC (rev 2156)
@@ -148,7 +148,7 @@
     //! Median vertex coodinate values
     VERTEX_MEDIAN,
     //! Random sampling of vertex coordinate values
-    VERTEX_SAMPLE,
+    VERTEX_SAMPLE
   };
   
     //! Settings used for tree construction

Modified: MOAB/trunk/configure.in
===================================================================
--- MOAB/trunk/configure.in	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/configure.in	2008-10-20 19:46:28 UTC (rev 2156)
@@ -5,6 +5,7 @@
 AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE
 
+EXTRA_GNU_FLAGS='-Wall -pipe -pedantic'
 SNL_CHECK_COMPILERS
 AM_CONDITIONAL(PARALLEL,[test "x$WITH_MPI" != "xno"])
 LIBS="-lm"

Modified: MOAB/trunk/m4/compiler.m4
===================================================================
--- MOAB/trunk/m4/compiler.m4	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/m4/compiler.m4	2008-10-20 19:46:28 UTC (rev 2156)
@@ -280,23 +280,26 @@
   GNU:sparc*)
     SNL_CXX_32BIT=-m32
     SNL_CXX_64BIT=-m64
-    SNL_CXX_SPECIAL="-Wall -pipe"
+    SNL_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:powerpc*)
     SNL_CXX_32BIT=-m32
     SNL_CXX_64BIT=-m64
-    SNL_CXX_SPECIAL="-Wall -pipe"
+    SNL_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:i?86|GNU:x86_64)
     SNL_CXX_32BIT=-m32
     SNL_CXX_64BIT=-m64
-    SNL_CXX_SPECIAL="-Wall -pipe"
+    SNL_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:mips*)
     SNL_CXX_32BIT="-mips32 -mabi=32"
     SNL_CXX_64BIT="-mips64 -mabi=64"
-    SNL_CXX_SPECIAL="-Wall -pipe"
+    SNL_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
+  GNU:*)
+    SNL_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
+    ;;
   VisualAge:*)
     SNL_CXX_32BIT=-q32
     SNL_CXX_64BIT=-q64
@@ -401,23 +404,26 @@
   GNU:sparc*)
     SNL_CC_32BIT=-m32
     SNL_CC_64BIT=-m64
-    SNL_CC_SPECIAL="-Wall -pipe"
+    SNL_CC_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:powerpc*)
     SNL_CC_32BIT=-m32
     SNL_CC_64BIT=-m64
-    SNL_CC_SPECIAL="-Wall -pipe"
+    SNL_CC_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:i?86|GNU:x86_64)
     SNL_CC_32BIT=-m32
     SNL_CC_64BIT=-m64
-    SNL_CC_SPECIAL="-Wall -pipe"
+    SNL_CC_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
   GNU:mips*)
     SNL_CC_32BIT="-mips32 -mabi=32"
     SNL_CC_64BIT="-mips64 -mabi=64"
-    SNL_CC_SPECIAL="-Wall -pipe"
+    SNL_CC_SPECIAL="$EXTRA_GNU_FLAGS"
     ;;
+  GNU:*)
+    SNL_CC_SPECIAL="$EXTRA_GNU_FLAGS"
+    ;;
   VisualAge:*)
     case "$target_vendor" in
       bgp)

Modified: MOAB/trunk/m4/hdf5.m4
===================================================================
--- MOAB/trunk/m4/hdf5.m4	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/m4/hdf5.m4	2008-10-20 19:46:28 UTC (rev 2156)
@@ -111,6 +111,9 @@
     fi
     if test -d "${HDF5_ARG}/include"; then
       HDF5_CPPFLAGS="$HDF5_CPPFLAGS -I${HDF5_ARG}/include"
+      if test "x$GXX" = "xyes"; then
+        HDF5_CPPFLAGS="$HDF5_CPPFLAGS -isystem ${HDF5_ARG}/include"
+      fi
     else
       HDF5_CPPFLAGS="$HDF5_CPPFLAGS -I${HDF5_ARG}"
     fi

Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/parallel/MBParallelComm.cpp	2008-10-20 19:46:28 UTC (rev 2156)
@@ -133,7 +133,7 @@
                    MB_MESG_ENTS,
                    MB_MESG_REMOTE_HANDLES_RANGE,
                    MB_MESG_REMOTE_HANDLES_VECTOR,
-                   MB_MESG_TAGS,};
+                   MB_MESG_TAGS };
     
 MBParallelComm::MBParallelComm(MBInterface *impl, MPI_Comm comm, int* id ) 
     : mbImpl(impl), procConfig(comm), sharedpTag(0), sharedpsTag(0),

Modified: MOAB/trunk/tools/tagprop/parse.cpp
===================================================================
--- MOAB/trunk/tools/tagprop/parse.cpp	2008-10-20 18:39:20 UTC (rev 2155)
+++ MOAB/trunk/tools/tagprop/parse.cpp	2008-10-20 19:46:28 UTC (rev 2156)
@@ -68,13 +68,13 @@
 template<typename T> int parse_value( const char*& iter, T& value )
 {
   char* endptr;
-  long long int parsed_val = strtoll( iter, &endptr, 0 );
+  long parsed_val = strtol( iter, &endptr, 0 );
   if (endptr == iter)
     return 1;
   iter = endptr; 
   
   value = (T)parsed_val;
-  if ((long long)value != parsed_val)
+  if ((long)value != parsed_val)
   {
     std::cerr << "Value too large: " << iter << std::endl;
     return 2;




More information about the moab-dev mailing list