[cffi-devel] <sigh> libtest.dll anyone?
VC++ considers: struct empty_struct {}; ...to be an error. Anyone got libtest.dll? Or should I break down and try Cygwin? Is that what other folks do? Maybe I missed a switch for the C++ compiler? -- Kenny Why Lisp? http://wiki.alu.org/RtL_Highlight_Film "I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it." Elwood P. Dowd, "Harvey", 1950
On 14/set/2005, at 02:21, Kenny Tilton wrote:
VC++ considers:
struct empty_struct {};
...to be an error. Anyone got libtest.dll? Or should I break down and try Cygwin? Is that what other folks do? Maybe I missed a switch for the C++ compiler?
I tested on Windows 2000 using both MSYS (similar to Cygwin) and the free MSVC++ toolkit. I use tests/compile.bat to compile with the free MSVC++: cl /ML /LD -D_MT /DWIN32=1 libtest.c -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt
Kenny Tilton <ktilton@nyc.rr.com> writes:
VC++ considers:
struct empty_struct {};
...to be an error. Anyone got libtest.dll? Or should I break down and try Cygwin? Is that what other folks do? Maybe I missed a switch for the C++ compiler?
For the record, I just tried compiling libtest with Visual C++ 2003 and it fails too. It seems that empty structures are not standard C (it's valid C++ though). Which makes me wonder how we should allocate empty structures, since the C and C++ ABI's differ in this aspect (like Rayiner mentioned). Since it's not standard C, but it is standard C++ perhaps we should make empty structures have size and alignment = 1 byte. So for now I'm commenting out this test STRUCT.ALIGNMENT.5 so that libtest is compilable with MSVC++. Is there any useful application of empty structs anyway? -- Luis Oliveira luismbo (@) gmail (.) com Equipa Portuguesa do Translation Project http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?team=pt
participants (2)
-
Kenny Tilton
-
Luis Oliveira