mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
protect against gcc compiler bugs in general
This commit is contained in:
parent
062c2acf8e
commit
42a456b2db
@ -54,8 +54,13 @@ record_task(Thread *current_thread) {
|
|||||||
// If the return value is other than NULL, someone else must have
|
// If the return value is other than NULL, someone else must have
|
||||||
// assigned the task first, in another thread. That shouldn't be
|
// assigned the task first, in another thread. That shouldn't be
|
||||||
// possible.
|
// possible.
|
||||||
|
|
||||||
|
// But different versions of gcc appear to have problems compiling these
|
||||||
|
// assertions correctly.
|
||||||
|
#ifndef __GNUC__
|
||||||
nassertv(result == NULL);
|
nassertv(result == NULL);
|
||||||
nassertv(current_thread->_current_task == this);
|
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
|
// If the return value is other than this, someone else must have
|
||||||
// assigned the task first, in another thread. That shouldn't be
|
// assigned the task first, in another thread. That shouldn't be
|
||||||
// possible.
|
// possible.
|
||||||
|
|
||||||
|
// But different versions of gcc appear to have problems compiling these
|
||||||
|
// assertions correctly.
|
||||||
|
#ifndef __GNUC__
|
||||||
nassertv(result == this);
|
nassertv(result == this);
|
||||||
nassertv(current_thread->_current_task == NULL);
|
nassertv(current_thread->_current_task == NULL);
|
||||||
|
#endif // __GNUC__
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user