This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9021: bug report
- From: Jaap de Wolff <wolff at NewBridges dot nl>
- To: "'gcc-gnats at gcc dot gnu dot org'" <gcc-gnats at gcc dot gnu dot org>
- Date: Fri, 20 Dec 2002 13:05:14 +0100
- Subject: c++/9021: bug report
>Number: 9021
>Category: c++
>Synopsis: No exports possible when using a class pointer in an union
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Dec 20 04:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: ${DEFAULT_RELEASE-$RELEASE_C}
>Organization:
>Environment:
System: NT4.0
Architecture: pentium 4
host: i386-pc-mingw32
build: i386-pc-mingw32
target: i386-pc-mingw32
configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads
--disable-nls --enable-languages=f77,c++,objc,ada --disable-win32-registry
--disable-shared : (reconfigured) ../gcc/configure --with-gcc --with-gnu-ld
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
--enable-threads --disable-nls --enable-languages=f77,c++,objc,ada
--disable-win32-registry --disable-shared
>Description:
When creating a class with in it an union, not all exports come in
the object file
>How-To-Repeat:
when compiling the following code with
g++ -DWITH_BUG=1 -c BugDemo.cpp
the generated object file will not contain exports
when compiling with
g++ -DWITH_BUG=0 -c BugDemo.cpp
the generated object file will contain exports
/*** Start of code ***/
// BugDemo.cpp: demonstration of export bug
//
//////////////////////////////////////////////////////////////////////
class __declspec (dllexport) BugDemo
{
public:
BugDemo();
virtual ~BugDemo();
union
{
#if WITH_BUG
class BugDemo* m_pBugDemo;
#else
BugDemo* m_pBugDemo;
#endif
};
};
BugDemo::BugDemo()
{
}
BugDemo::~BugDemo()
{
}
/*** End of code ***/
---
Jaap de Wolff
Wolff@NewBridges.nl
New Bridges B.V.
Calandstraat 44
3316 EA Dordrecht
Tel. 078 6548787
Fax 078 6548788
www.NewBridges.nl
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
If the bug report must be sent to someone else, please inform me!