diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-23 14:56:48 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-23 14:56:48 +0000 |
commit | 21a3e03414719df5ce8d78555cfb575dcc8d22c7 (patch) | |
tree | 0e47c675ab7cee9f6ecfde53d2aa6253c1b0783d /gcc/cp/except.c | |
parent | f2ca19b4177f1c9bf3a3daaa1c1e4282a75aa138 (diff) | |
download | linaro-gcc-21a3e03414719df5ce8d78555cfb575dcc8d22c7.tar.gz linaro-gcc-21a3e03414719df5ce8d78555cfb575dcc8d22c7.tar.bz2 linaro-gcc-21a3e03414719df5ce8d78555cfb575dcc8d22c7.zip |
PR c++/50055
* except.c (begin_eh_spec_block): Build EH_SPEC block on the
same line as the function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r-- | gcc/cp/except.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 129d2f43441..bfc520d93d2 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -527,15 +527,17 @@ tree begin_eh_spec_block (void) { tree r; + location_t spec_location = DECL_SOURCE_LOCATION (current_function_decl); + /* A noexcept specification (or throw() with -fnothrow-opt) is a MUST_NOT_THROW_EXPR. */ if (TYPE_NOEXCEPT_P (TREE_TYPE (current_function_decl))) { - r = build_stmt (input_location, MUST_NOT_THROW_EXPR, NULL_TREE); + r = build_stmt (spec_location, MUST_NOT_THROW_EXPR, NULL_TREE); TREE_SIDE_EFFECTS (r) = 1; } else - r = build_stmt (input_location, EH_SPEC_BLOCK, NULL_TREE, NULL_TREE); + r = build_stmt (spec_location, EH_SPEC_BLOCK, NULL_TREE, NULL_TREE); add_stmt (r); TREE_OPERAND (r, 0) = push_stmt_list (); return r; |