Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"05-27-10 - Weird Compiler Error"

8 Comments -

1 – 8 of 8
Blogger Unknown said...

btw, you can also use the __debugbreak intrinsic.

May 27, 2010 at 7:57 PM

Anonymous Anonymous said...

Except for the fact that we're sharing the code and I develop in VC6.

May 27, 2010 at 9:44 PM

Blogger ryg said...

Well, you can just use __debugbreak for the x64 builds.

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 why 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?

May 27, 2010 at 10:12 PM

Blogger cbloom said...

"btw, you can also use the __debugbreak intrinsic. "

Yeah, once I figured out that the problem was a circular define, the solution was easy.

"VC x64 not supporting inline ASM bit me in a major way recently:"

Yeah that's very annoying.

May 27, 2010 at 11:00 PM

Blogger Big McLargeHuge said...

There's a DebugBreak() function in windows.h, you can use that on all platforms and it works with VC6 too.

May 29, 2010 at 12:54 AM

Blogger Arseny Kapoulkine said...

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.

#define new new(__FILE__, __LINE__)

does a single substitution (yes, I know that this does not work with placement new and that there are better methods).

May 30, 2010 at 3:43 AM

Blogger cbloom said...

"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."

Oh yeah, you are quite right.

May 30, 2010 at 11:37 AM

Blogger Michael said...

http://xkcd.com/754/

June 21, 2010 at 12:50 PM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.