[GCC-XML] assert with VC71

Brad King brad.king at kitware.com
Fri Jan 27 09:50:24 EST 2006


Stefan Roiser wrote:
> we discovered a problem with assert on VC71. Gccxml replaces assert.h  
> for this compiler with its own assert definition
> 
> #define assert(exp) (void)( (exp) || (_assert((void*)#exp, __FILE__,  
> __LINE__), 0) )
> 
> The cast to (void*) is causing us problems (cannot cast const char*  to 
> void*). The original definition without the cast works. Could this  cast 
> be removed again or will it break something else?

The funny thing is that change was inherited from the patches for VC 6 
and VC 7.0 headers to fix problems with const correctness in asserts :)

Since assertions are not really useful for GCC-XML anyway I just 
modified the patching process to define the assert macro to empty just 
as it is in a release build.  If you do a cvs update you should get the 
fixes.

-Brad



More information about the gccxml mailing list