tag:blogger.com,1999:blog-5246987755651065286.post7827853573437415913..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 05-27-10 - Weird Compiler Errorcbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5246987755651065286.post-76824183948102447972010-06-21T12:50:18.048-07:002010-06-21T12:50:18.048-07:00http://xkcd.com/754/http://xkcd.com/754/Michaelhttps://www.blogger.com/profile/14045209789060744520noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-58591721648983318132010-05-30T11:37:13.769-07:002010-05-30T11:37:13.769-07:00"To be more precise, preprocessor substitutes..."To be more precise, preprocessor substitutes RR_ASSERT(expr) by assert(expr), and then substituted assert by RR_ASSERT. Which is sometimes a useful behavior, i.e."<br /><br />Oh yeah, you are quite right.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-1440212491912388822010-05-30T03:43:41.858-07:002010-05-30T03:43:41.858-07:00To be more precise, preprocessor substitutes RR_AS...To be more precise, preprocessor substitutes RR_ASSERT(expr) by assert(expr), and then substituted assert by RR_ASSERT. Which is sometimes a useful behavior, i.e.<br /><br />#define new new(__FILE__, __LINE__)<br /><br />does a single substitution (yes, I know that this does not work with placement new and that there are better methods).Arseny Kapoulkinehttps://www.blogger.com/profile/18310595345818946666noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-83483318967245296552010-05-29T00:54:42.877-07:002010-05-29T00:54:42.877-07:00There's a DebugBreak() function in windows.h, ...There's a DebugBreak() function in windows.h, you can use that on all platforms and it works with VC6 too.Big McLargeHugehttps://www.blogger.com/profile/07671696810739732899noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-1427980242390206862010-05-27T23:00:21.547-07:002010-05-27T23:00:21.547-07:00"btw, you can also use the __debugbreak intri..."btw, you can also use the __debugbreak intrinsic. "<br /><br />Yeah, once I figured out that the problem was a circular define, the solution was easy.<br /><br />"VC x64 not supporting inline ASM bit me in a major way recently:"<br /><br />Yeah that's very annoying.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-29733779995226500562010-05-27T22:12:02.930-07:002010-05-27T22:12:02.930-07:00Well, you can just use __debugbreak for the x64 bu...Well, you can just use __debugbreak for the x64 builds.<br /><br />VC x64 not supporting inline ASM bit me in a major way recently: I really did need to write some ASM code to interface with code generated for a different calling convention, plus some small SSE tidbits that needed a certain register mapping. Not only is it inconvenient, it also forces me to make some things that are pure implementation helpers for one file public symbols, and in this case it also made me use fucking MASM. I promptly got reminded <b>why</b> I avoided that POS for years when it randomly decided to assemble "cmpneqps xmm8, [rdx + blah]" as "cmpeqps xmm8, [rdx + blah]" in some places. What the hell, people?ryghttps://www.blogger.com/profile/03031635656201499907noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-6492262076505037382010-05-27T21:44:32.612-07:002010-05-27T21:44:32.612-07:00Except for the fact that we're sharing the cod...Except for the fact that we're sharing the code and I develop in VC6.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-64884916913356891122010-05-27T19:57:21.235-07:002010-05-27T19:57:21.235-07:00btw, you can also use the __debugbreak intrinsic.btw, you can also use the <a rel="nofollow">__debugbreak</a> intrinsic.Anonymoushttps://www.blogger.com/profile/11292935397253682765noreply@blogger.com