H
Hendrik Schober
Hi,
I have some header files that contain macros in a special
syntax. These files are used with various tools that
extract information from these macros. One of these tools
is cl.exe.
Basically, these files contain this:
MYMACRO( ID4711, 4711, "str4711_1", "str4711_2" )
MYMACRO( ID4712, 4713, "str4712_1", "str4712_2" )
...
For cl.exe, this expands to:
NS::CSingleton::get().f( "str4711_1" "_" "str4711_2" , 4711 );
NS::CSingleton::get().f( "str4711_1" "_" "str4711_2" "_sfx" , 4712 );
NS::CSingleton::get().f( "str4713_1" "_" "str4713_2" , 4713 );
NS::CSingleton::get().f( "str4713_1" "_" "str4713_2" "_sfx" , 4714 );
...
where 'CSingleton' looks like this:
class CSingleton {
public:
CSingleton& get();
void f(const char*,unsigned int);
};
All this is included in a somewhat funny way to generate
some startup code:
void g()
{
#include "funny_header1.h"
#include "funny_header2.h"
#include "funny_header3.h"
#include "funny_header4.h"
...
}
I have long since split 'g()' into many small functions
each one including only a couple of the headers since
VC6 couldn't deal with all the code at once. Now some of
these headers seem to have grown beyond what VC7.1 can
handle. After about 240 of those macro lines, it gives
me:
fatal error C1509: compiler limit : too many exception handler states in function 'f()'. simplify function
While I think that splitting these headers would probably
help, this would be the last resort, since it messes up
processing these files with other the tools.
Instead I'm trying to find out how to cut the exception
handler states the compiler needs. How to tackle this?
I tried to change 'CSingleton' to this:
class CSingleton {
public:
CSingleton& get() throw();
void f(const char*,unsigned int) throw();
};
but this didn't help. The '__declspec(nothrow)' didn't
help either.
Is there anything else I can do?
Schobi
--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers
I have some header files that contain macros in a special
syntax. These files are used with various tools that
extract information from these macros. One of these tools
is cl.exe.
Basically, these files contain this:
MYMACRO( ID4711, 4711, "str4711_1", "str4711_2" )
MYMACRO( ID4712, 4713, "str4712_1", "str4712_2" )
...
For cl.exe, this expands to:
NS::CSingleton::get().f( "str4711_1" "_" "str4711_2" , 4711 );
NS::CSingleton::get().f( "str4711_1" "_" "str4711_2" "_sfx" , 4712 );
NS::CSingleton::get().f( "str4713_1" "_" "str4713_2" , 4713 );
NS::CSingleton::get().f( "str4713_1" "_" "str4713_2" "_sfx" , 4714 );
...
where 'CSingleton' looks like this:
class CSingleton {
public:
CSingleton& get();
void f(const char*,unsigned int);
};
All this is included in a somewhat funny way to generate
some startup code:
void g()
{
#include "funny_header1.h"
#include "funny_header2.h"
#include "funny_header3.h"
#include "funny_header4.h"
...
}
I have long since split 'g()' into many small functions
each one including only a couple of the headers since
VC6 couldn't deal with all the code at once. Now some of
these headers seem to have grown beyond what VC7.1 can
handle. After about 240 of those macro lines, it gives
me:
fatal error C1509: compiler limit : too many exception handler states in function 'f()'. simplify function
While I think that splitting these headers would probably
help, this would be the last resort, since it messes up
processing these files with other the tools.
Instead I'm trying to find out how to cut the exception
handler states the compiler needs. How to tackle this?
I tried to change 'CSingleton' to this:
class CSingleton {
public:
CSingleton& get() throw();
void f(const char*,unsigned int) throw();
};
but this didn't help. The '__declspec(nothrow)' didn't
help either.
Is there anything else I can do?
Schobi
--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers