Skip to content

Commit

Permalink
Merge pull request #4254 from schveiguy/issue13937
Browse files Browse the repository at this point in the history
Fix issue 13937 -  C++ mangling for template negative parameter not correct for dmc
  • Loading branch information
WalterBright committed Jan 6, 2015
2 parents d7ef799 + 44429a3 commit b208c82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 6 additions & 0 deletions src/cppmangle.c
Expand Up @@ -1477,6 +1477,12 @@ class VisualCPPMangler : public Visitor
{
tmp.mangleNumber(e->toUInteger());
}
else if(is_dmc_template)
{
// NOTE: DMC mangles everything based on
// unsigned int
tmp.mangleNumber(e->toInteger());
}
else
{
sinteger_t val = e->toInteger();
Expand Down
14 changes: 1 addition & 13 deletions test/runnable/cppa.d
Expand Up @@ -5,14 +5,6 @@ import core.stdc.stdio;
import core.stdc.stdarg;
import core.stdc.config;

// BUG: fix for 13932 doesn't work on Win32 for some reason. Therefore
// it is disabled on Windows 32-bit, but enabled on all other platforms.
version(Win32) {}
else
{
version = doTest13932;
}

extern (C++)
int foob(int i, int j, int k);

Expand Down Expand Up @@ -639,15 +631,12 @@ void test13707()

/****************************************/

version(doTest13932)
{
struct S13932(int x)
{
int member;
}

extern(C++) void func13932(S13932!(-1) s);
}

/****************************************/

Expand All @@ -674,8 +663,7 @@ void main()
test15();
test16();
func13707();
version(doTest13932)
func13932(S13932!(-1)(0));
func13932(S13932!(-1)(0));

printf("Success\n");
}

0 comments on commit b208c82

Please sign in to comment.