[cfe-dev] Compatibility with g++ and VS

Martin C. Martin martin at martincmartin.com
Tue Jul 13 03:59:07 PDT 2010


We're not calling the Clang command line program, but rather hooking 
into parts of it to JIT compile some code.  We'd like to pass data 
structures back and forth between the Clang compiled code and the 
ahead-of-time compiled code, which uses g++ on Linux and VS on Windows.

So my question is: are classes laid out exactly the same in memory?  If 
I give the same source to g++/VS and Clang, will the objects have the 
same fields in the same order with the same padding, same virtual 
function table, etc. ?


More information about the cfe-dev mailing list