projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ff2a11
)
make the result of the cimag macro a non-lvalue
author
Rich Felker
<dalias@aerifal.cx>
Wed, 17 Dec 2014 21:44:43 +0000
(16:44 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 17 Dec 2014 21:45:42 +0000
(16:45 -0500)
this change is not necessary but helps diagnose invalid code. based on
patch by Jens Gustedt.
include/complex.h
patch
|
blob
|
history
diff --git
a/include/complex.h
b/include/complex.h
index 23bab7d5593042e3c878707ad22dc86cdb843a1d..bdddf87bbd312e1a901a7c529c4fa42ccbd02e1a 100644
(file)
--- a/
include/complex.h
+++ b/
include/complex.h
@@
-103,7
+103,7
@@
long double creall(long double complex);
#ifndef __cplusplus
#define __CIMAG(x, t) \
- ((union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])
+ (
+
(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])
#define creal(x) ((double)(x))
#define crealf(x) ((float)(x))