diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-02 10:44:23 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-02 10:44:23 +0000 |
commit | 9eb2fc59ccbde2941669c5e534313d601f3b4348 (patch) | |
tree | 90e7f26ca39213a55265b9d10bc4bb84ec14a2d4 /gcc | |
parent | dbce4077b4875a95134f8b5ed3dff956760a2031 (diff) | |
download | gcc-9eb2fc59ccbde2941669c5e534313d601f3b4348.tar.gz |
/cp
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
* semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
/testsuite
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
* g++.dg/parse/crash64.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203109 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash64.C | 7 |
4 files changed, 18 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1ec1cd345ce..55655c60bec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58565 + * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR. + 2013-10-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58563 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 13277948bf4..a7874e765a7 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -8422,6 +8422,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags) case OVERLOAD: case TEMPLATE_ID_EXPR: case LABEL_DECL: + case LABEL_EXPR: case CONST_DECL: case SIZEOF_EXPR: case ALIGNOF_EXPR: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2fb3cc63e5c..cbeb33dd7e7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58565 + * g++.dg/parse/crash64.C: New. + 2013-10-02 Yufeng Zhang <yufeng.zhang@arm.com> * gcc.dg/tree-ssa/slsr-40.c: New test. diff --git a/gcc/testsuite/g++.dg/parse/crash64.C b/gcc/testsuite/g++.dg/parse/crash64.C new file mode 100644 index 00000000000..9e1dfea6c32 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash64.C @@ -0,0 +1,7 @@ +// PR c++/58565 +// { dg-options "" } + +void foo() +{ + int i = ({ L: ; }); // { dg-error "void value not ignored" } +} |