Revision: 56920
http://sourceforge.net/p/brlcad/code/56920
Author: tbrowder2
Date: 2013-08-17 23:06:09 +0000 (Sat, 17 Aug 2013)
Log Message:
-----------
short term fix for gcc 4.8.1 error; prevents value from exceeding LONG_MAX
Modified Paths:
--------------
brlcad/trunk/src/libfb/if_X24.c
Modified: brlcad/trunk/src/libfb/if_X24.c
===================================================================
--- brlcad/trunk/src/libfb/if_X24.c 2013-08-17 23:04:57 UTC (rev 56919)
+++ brlcad/trunk/src/libfb/if_X24.c 2013-08-17 23:06:09 UTC (rev 56920)
@@ -78,6 +78,8 @@
#define SHMEM_KEY 42
+/* FIXME: see next FIXME ref gcc 4.8.1 error */
+const GLUMTBL_FACTOR = LONG_MAX / 256;
/*
* Per window state information.
@@ -951,7 +953,16 @@
int i;
for (i = 0; i < 256; i++) {
rlumtbl[i] = i * 5016388;
- glumtbl[i] = i * 9848226;
+ /* FIXME: The following line constant factor 9848226
causes an error with gcc 4.8.1:
+ * error: iteration 219u invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
+ *
+ * Short term fix is to make the factor = LONG_MAX / 256
until someone
+ * with more contextual knowledge can fix it properly.
+ *
+ */
+
+ /* glumtbl[i] = i * 9848226; */
+ glumtbl[i] = i * GLUMTBL_FACTOR;
blumtbl[i] = i * 1912603;
}
lumdone = 1;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits