Revision: 53817
          http://brlcad.svn.sourceforge.net/brlcad/?rev=53817&view=rev
Author:   starseeker
Date:     2012-11-26 18:53:19 +0000 (Mon, 26 Nov 2012)
Log Message:
-----------
Handle GCC pragmas more carefully - if we're at 4.6 or better, suppress the 
warnings only for the Eigen headers themselves.  Else, fall back to the simpler 
behavior.  If GCC is too old, don't try pragma at all.

Modified Paths:
--------------
    brlcad/trunk/src/libnurbs/opennurbs_fit.h

Modified: brlcad/trunk/src/libnurbs/opennurbs_fit.h
===================================================================
--- brlcad/trunk/src/libnurbs/opennurbs_fit.h   2012-11-26 16:30:35 UTC (rev 
53816)
+++ brlcad/trunk/src/libnurbs/opennurbs_fit.h   2012-11-26 18:53:19 UTC (rev 
53817)
@@ -45,12 +45,17 @@
 #include <map>
 #include <stdio.h>
 
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
 #  pragma message "Disabling GCC shadow warnings via pragma due to Eigen 
headers..."
 #  pragma message "Disabling GCC float equality comparison warnings via pragma 
due to Eigen headers..."
 #endif
-#pragma GCC diagnostic ignored "-Wshadow"
-#pragma GCC diagnostic ignored "-Wfloat-equal"
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
6))
+#  pragma GCC diagnostic push
+#endif
+#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  pragma GCC diagnostic ignored "-Wshadow"
+#  pragma GCC diagnostic ignored "-Wfloat-equal"
+#endif
 #undef Success
 #include <Eigen/StdVector>
 #undef Success
@@ -59,6 +64,9 @@
 #include <Eigen/Sparse>
 #undef Success
 #include <Eigen/SparseCholesky>
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
6))
+#  pragma GCC diagnostic pop
+#endif
 
 namespace on_fit
 {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to