projects
/
platform
/
upstream
/
linaro-gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84458df
)
(build_conditional_expr): Merged const and volatile flags of incoming types.
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Aug 1992 19:36:44 +0000
(19:36 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Aug 1992 19:36:44 +0000
(19:36 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1767
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index
ac8e48e
..
52c3c21
100644
(file)
--- a/
gcc/c-typeck.c
+++ b/
gcc/c-typeck.c
@@
-3538,6
+3538,12
@@
build_conditional_expr (ifexp, op1, op2)
}
}
+ /* Merge const and volatile flags of the incoming types. */
+ result_type
+ = build_type_variant (result_type,
+ TYPE_READONLY (op1) || TYPE_READONLY (op2),
+ TYPE_VOLATILE (op1) || TYPE_VOLATILE (op2));
+
if (result_type != TREE_TYPE (op1))
op1 = convert (result_type, op1);
if (result_type != TREE_TYPE (op2))