diff options
author | vapier <vapier@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-07 22:18:09 +0000 |
---|---|---|
committer | vapier <vapier@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-07 22:18:09 +0000 |
commit | 0bd8bd68f55f5c96970ee352249a8c5ce8b63ee8 (patch) | |
tree | a71ad8e5ab3d5d43c7fb009f148945a1865708ae /include | |
parent | 63c8fa77a45a477c40c2fddda782dc95362f420b (diff) | |
download | gcc-0bd8bd68f55f5c96970ee352249a8c5ce8b63ee8.tar.gz |
longlong: fix sh -Wundef builds
This file fails when building for SuperH as it assumes __SHMEDIA__
is always defined. Update the code to check if it's defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232143 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 6 | ||||
-rw-r--r-- | include/longlong.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 6d1264845b5..adab9eebafb 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2016-01-07 Mike Frysinger <vapier@gentoo.org> + + * longlong.h: Change !__SHMEDIA__ to + (!defined (__SHMEDIA__) || !__SHMEDIA__). + Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__. + 2016-01-05 Mike Frysinger <vapier@gentoo.org> * libiberty.h (dupargv): Change arg to char * const *. diff --git a/include/longlong.h b/include/longlong.h index d7ef671226c..34ad9b4f571 100644 --- a/include/longlong.h +++ b/include/longlong.h @@ -1086,7 +1086,7 @@ extern UDItype __umulsidi3 (USItype, USItype); } while (0) #endif -#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32 +#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32 #ifndef __sh1__ #define umul_ppmm(w1, w0, u, v) \ __asm__ ( \ @@ -1159,7 +1159,7 @@ extern UDItype __umulsidi3 (USItype, USItype); #endif /* __sh__ */ -#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32 +#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32 #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) #define count_leading_zeros(count, x) \ do \ |