structs in inline class members

Brandon Reinhart brandon@epicgames.com
Fri Jun 25 22:19:00 GMT 1999


I'm currently porting win32 software over to Linux.  I develop under MS Dev 
Studio 6.0 under NT and egcs-2.90.29 under RedHat.

I am new to egcs, but have found it pretty easy to use.  A few minor issues 
have stemmed from porting code that flys under DevStudio but breaks under 
egcs.  For the most part, I have fixed the issues.  I do have a couple 
questions.

I use machine generated code extensively.  We have a scripting language 
called UnrealScript that is closely married to the C++ side of our game 
engine.  UnrealScript objects automatically generate their C++ 
interfaces.  These interfaces make extensive use of inline functions with 
internal struct declarations.  This works under MSC but not under egcs.  It 
appears that egcs will not inline the function if it finds a struct 
declared in that function.  Is there a work around for this?  (Other than 
me rewriting the code generator.)

egcs also seems to refuse to inline class members that have try/catch 
blocks inside of them that don't return a value.  To clarify: if I have a 
method that returns an int and the try/catch block does not, egcs will not 
inline the function.  (MSC will.)

While I could change the above, I would prefer to find a compile level or 
linker level solution to the problem.

Thank you,

Brandon "GreenMarine" Reinhart
Epic Games, Inc.


More information about the Gcc mailing list