Author: muggenhor Date: Mon Apr 6 00:04:51 2009 New Revision: 6957 URL: http://svn.gna.org/viewcvs/warzone?rev=6957&view=rev Log: Allow code passing and retrieving of enums as vararg parameters in C++ as well.
In C++ enums are treated differently from integers in some cases, causing GCC to emit some rather nasty abort()-like code (x86/x64 instruction "ud2a") when used as the type for va_arg(). This was the compiler message generated: {{{ stack.c:339: warning: ‘INTERP_TYPE’ is promoted to ‘int’ when passed through ‘...’ stack.c:339: note: (so you should pass ‘int’ not ‘INTERP_TYPE’ to ‘va_arg’) stack.c:339: note: if this code is reached, the program will abort }}} NOTE: Compiling as C++ now works (as does the produced code), using: {{{./configure CC=g++ CFLAGS=-fpermissive --enable-debug=relaxed}}} Modified: trunk/lib/script/stack.c _______________________________________________ Warzone-commits mailing list Warzone-commits@gna.org https://mail.gna.org/listinfo/warzone-commits