Skip to content

Commit

Permalink
Avoid weird SEH error in Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Aug 18, 2012
1 parent a8be86a commit a44ccbf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/template.c
Original file line number Diff line number Diff line change
Expand Up @@ -4506,6 +4506,12 @@ void TemplateInstance::tryExpandMembers(Scope *sc2)
#if WINDOWS_SEH
if(nest == 1)
{
/* If you remove this dummy variable declaration,
* running test/fail_compilation/fail281.d stops dmd without error message.
* It seems to me that is dmc's SEH code generation bug.
*/
bool dummy = 0;

// do not catch at every nesting level, because generating the output error might cause more stack
// errors in the __except block otherwise
__try
Expand Down

0 comments on commit a44ccbf

Please sign in to comment.