aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-08-19 22:55:44 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-08-19 22:55:44 +0100
commit02ee3d31539a74740040921e34e38035fbd8ac72 (patch)
treededb875c748827bdc9c66d163a7cce230835bd29 /gcc/c-parser.c
parent54f6892e4b7baa65bd5a16e5800258c319710e3c (diff)
downloadgcc-02ee3d31539a74740040921e34e38035fbd8ac72.zip
gcc-02ee3d31539a74740040921e34e38035fbd8ac72.tar.gz
gcc-02ee3d31539a74740040921e34e38035fbd8ac72.tar.bz2
c-parser.c (c_parser_postfix_expression): Convert operands of __builtin_complex to their semantic types.
* c-parser.c (c_parser_postfix_expression): Convert operands of __builtin_complex to their semantic types. From-SVN: r177915
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 92821b1..ff376df 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -6428,7 +6428,13 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
mark_exp_read (e1.value);
+ if (TREE_CODE (e1.value) == EXCESS_PRECISION_EXPR)
+ e1.value = convert (TREE_TYPE (e1.value),
+ TREE_OPERAND (e1.value, 0));
mark_exp_read (e2.value);
+ if (TREE_CODE (e2.value) == EXCESS_PRECISION_EXPR)
+ e2.value = convert (TREE_TYPE (e2.value),
+ TREE_OPERAND (e2.value, 0));
if (!SCALAR_FLOAT_TYPE_P (TREE_TYPE (e1.value))
|| DECIMAL_FLOAT_TYPE_P (TREE_TYPE (e1.value))
|| !SCALAR_FLOAT_TYPE_P (TREE_TYPE (e2.value))