From 42a456b2dbb81082fa33a762eddf187155e4ecfd Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 4 May 2010 17:07:15 +0000 Subject: [PATCH] protect against gcc compiler bugs in general --- panda/src/pipeline/asyncTaskBase.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/panda/src/pipeline/asyncTaskBase.cxx b/panda/src/pipeline/asyncTaskBase.cxx index aea3733d18..529da4cfa7 100644 --- a/panda/src/pipeline/asyncTaskBase.cxx +++ b/panda/src/pipeline/asyncTaskBase.cxx @@ -54,8 +54,13 @@ record_task(Thread *current_thread) { // If the return value is other than NULL, someone else must have // assigned the task first, in another thread. That shouldn't be // possible. + + // But different versions of gcc appear to have problems compiling these + // assertions correctly. +#ifndef __GNUC__ nassertv(result == NULL); nassertv(current_thread->_current_task == this); +#endif // __GNUC__ } //////////////////////////////////////////////////////////////////// @@ -75,6 +80,11 @@ clear_task(Thread *current_thread) { // If the return value is other than this, someone else must have // assigned the task first, in another thread. That shouldn't be // possible. + + // But different versions of gcc appear to have problems compiling these + // assertions correctly. +#ifndef __GNUC__ nassertv(result == this); nassertv(current_thread->_current_task == NULL); +#endif // __GNUC__ }