diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-21 22:16:02 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-21 22:16:02 +0000 |
commit | 3ef640ff824c50b11aa7bffc1bbf0cc8c33ccc1b (patch) | |
tree | 8002de9a5b616aaa19e5e5969272829ed34eea54 /gcc/cp/pt.c | |
parent | 7522af2a26fd69aeedab8a7a3b16457cf6f424d0 (diff) | |
download | gcc-3ef640ff824c50b11aa7bffc1bbf0cc8c33ccc1b.tar.gz |
PR c++/12515
* pt.c (build_non_dependent_expr): Handle GNU extension to ?:
operator.
PR c++/12515
* g++.dg/ext/cond1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73820 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 4afe974616d..5b969388a64 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11893,7 +11893,9 @@ build_non_dependent_expr (tree expr) return build (COND_EXPR, TREE_TYPE (expr), TREE_OPERAND (expr, 0), - build_non_dependent_expr (TREE_OPERAND (expr, 1)), + (TREE_OPERAND (expr, 1) + ? build_non_dependent_expr (TREE_OPERAND (expr, 1)) + : build_non_dependent_expr (TREE_OPERAND (expr, 0))), build_non_dependent_expr (TREE_OPERAND (expr, 2))); if (TREE_CODE (expr) == COMPOUND_EXPR && !COMPOUND_EXPR_OVERLOADED (expr)) |