Opened 21 years ago

Last modified 15 years ago

#928 closed Bugs (wontfix)

VC6: should __fastcall be defined? — at Initial Version

Reported by: chuckm Owned by: John Maddock
Milestone: Component: regex
Version: None Severity: Problem
Keywords: Cc:

Description

In regex_config.hpp, we have:

   #ifndef __WIN32__
      #define BOOST_RE_CALL
      #define BOOST_RE_CCALL
   #else
      #define BOOST_RE_CALL __fastcall
      #define BOOST_RE_CCALL __stdcall
   #endif

I see the need for __stdcall begin defined, since 
sometimes you need this for a system call (such as 
starting a thread, if I recall correctly). 

But why __fastcall?  When I'm doing a debug build, I 
don't want __fastcall protocol.  I want the slower, 
easier-to-debug protocol.  When I want __fastcall, I 
turn on the /Gr option.

As it stands, I get a compiler warning when I build 
with the /Ge option for run-time stack checking (which 
I always do in development/debug mode).  It's 
complaining that __fastcall doesn't work work nicely 
with /Ge.  So, I'd like to have BOOST_RE_CALL defined 
to be empty during debug builds.

During release builds, BOOST_RE_CLAL can also be 
defined to be empty: I use the /Gr compiler option, 
which makes all functions use __fastcall by default.

In short, I see no reason why anyone would want 
__fastcall to be defined in regex_config.hpp, while 
it's easy (for me) to see why it shouldn't be there.

Suggested fix: remove the BOOST_RE_CALL macro 
altogether.

Change History (0)

Note: See TracTickets for help on using tickets.