mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl: Use DETECT_CC_GCC_VERSION in glsl/builtin_functions.cpp
The expression "(__GNUC__ * 100) + __GNUC_MINOR" is invalid because __GNUC_MINOR is not defined by the compiler This can not fixes the previous version because DETECT_CC_GCC_VERSION is not available in previous released version Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19771>
This commit is contained in:
parent
71a0a386b5
commit
ad0d39efed
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,9 @@
|
|||
* MinGW 7.3.0 (in Ubuntu 18.04) does not have this bug. Assume versions before 7.3.x are buggy
|
||||
*/
|
||||
|
||||
#if defined(__MINGW32__) && ((__GNUC__ * 100) + __GNUC_MINOR < 703)
|
||||
#include "util/detect_cc.h"
|
||||
|
||||
#if defined(__MINGW32__) && (DETECT_CC_GCC_VERSION < 703)
|
||||
#warning "disabling optimizations for this file to work around compiler bug"
|
||||
#pragma GCC optimize("O1")
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue