Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Do not set TREE_NOTHROW for nothrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Feb 12, 2014
1 parent 8eda90e commit e25e4d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions gcc/d/ChangeLog
@@ -1,3 +1,10 @@
2014-02-12 Johannes Pfau <johannespfau@gmail.com>

* d-decls.cc(FuncDeclaration::toSymbol): Do not set TREE_NOTHROW on
nothrow functions.
* d-decls.cc(TypeInfoDeclaration::toSymbol): Call relayout_decl after
changing the type.

2014-02-03 Iain Buclaw <ibuclaw@gdcproject.org>


Expand Down
4 changes: 1 addition & 3 deletions gcc/d/d-decls.cc
Expand Up @@ -215,6 +215,7 @@ TypeInfoDeclaration::toSymbol (void)
// given TypeInfo. It is the actual data, not a reference
gcc_assert (TREE_CODE (TREE_TYPE (csym->Stree)) == REFERENCE_TYPE);
TREE_TYPE (csym->Stree) = TREE_TYPE (TREE_TYPE (csym->Stree));
relayout_decl (csym->Stree);
TREE_USED (csym->Stree) = 1;

// Built-in typeinfo will be referenced as one-only.
Expand Down Expand Up @@ -387,9 +388,6 @@ FuncDeclaration::toSymbol (void)
if (isPure() == PUREstrong && vthis == NULL
&& ftype->isnothrow && ftype->retStyle() == RETstack)
DECL_PURE_P (fndecl) = 1;

if (ftype->isnothrow)
TREE_NOTHROW (fndecl) = 1;
}

#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
Expand Down

0 comments on commit e25e4d0

Please sign in to comment.