c++/7683: compiling with -g creates multiple symbols of the same name
spamjunk@stny.rr.com
spamjunk@stny.rr.com
Thu Aug 22 10:26:00 GMT 2002
>Number: 7683
>Category: c++
>Synopsis: compiling with -g creates multiple symbols of the same name
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 22 09:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Rich
>Release: unknown-1.0
>Organization:
>Environment:
djgpp
>Description:
// this code will create two symbols called "_x" will cause the linker to fail.
template<int I>
struct foo {
};
template<>
struct foo<1> {
static const int& val()
{
static const int x = 1;
return x;
}
};
template<>
struct foo<2> {
static const int& val()
{
static const int x = 2;
return x;
}
};
int main()
{
int x;
x = foo<1>::val();
x = foo<2>::val();
return 0;
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list