Click here to Skip to main content
Click here to Skip to main content

__asm int 3 in template function ( in VC6 )

By , 8 Apr 2009
Rate this:
Please Sign up or sign in to vote.

We usually use __asm int 3 in the code to hard code break points. But have you tried setting a __asm int 3 in a template function? Like...

template<</>class T> int Testfunc( T Obj )
__asm int 3;
return Obj++;

void main()
Testfunc( 1 );

The above code will never get compiled in vc6. It will generate the below error

(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information
Generating Code...Command line warning D4028 : minimal rebuild failure, reverting to normal build
Error executing cl.exe."

But the same code will compile fine in later versions of visual studio. Seems they have fixed the bug Smile | :)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Software Developer (Senior)
Singapore Singapore
No Biography provided

Comments and Discussions

GeneralMy vote of 1 PinmemberMizan Rahman8-Aug-11 23:20 
Questionso whats the solution? Not to use this in VC6? PinmemberAnandChavali8-Apr-09 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140421.2 | Last Updated 8 Apr 2009
Article Copyright 2009 by Naveen
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid