ICE with __declspec(dllimport) psymtab.c line 4227

  • Thread starter Thread starter Geoffrey
  • Start date Start date
G

Geoffrey

We write lots of cross platform code at my company. To facilitate
this, class declarations are handled like this (simplification):

#if defined(_WIN32)
#if defined(BUILDLIB)
#define CLASSDECLARE( c ) class __declspec(dllexport) c
#else
#define CLASSDECLARE( c ) class c //note the absence of dllimport
#endif
#endif

#if defined(_SOMEOTHERPLATFORM)
#define CLASSDECLARE( c ) //irrelevent never seen by cl.exe
#endif

.....

CLASSDECLARE( MyClass )
{
public:
.....
}

Changing CLASSDECLARE in the case that BUILDLIB is not defined to

#define CLASSDECLARE( c ) class __declspec(dllimport) c

cases an ICE:

fatal error C1001: INTERNAL COMPILER ERROR (compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c', line 4227)
Please choose the Technical Support command on the Visual C++ Help
menu, or open the Technical Support help file for more information
Solid : error PRJ0002 : error result returned from 'cl.exe'.
 
We write lots of cross platform code at my company. To facilitate
this, class declarations are handled like this (simplification):
...
cases an ICE:

Geoffrey,

Can you give us a minimal concrete example - something that can be
simply pasted into a console application and cause the problem.

Dave
 
Back
Top