Re: #define and (brackets)
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Mon, 24 Nov 2008 22:14:36 -0500
"Alan Carre" <alan@xxxxxxxxxxxxxxxxx> wrote in message
news:O2UQLypTJHA.1332@xxxxxxxxxxxxxxxxxxxx
Correction. On it's own it works, but in a macro it doesn't:
#define SHRX -10
#define SHRY -20
#define SHRINK(rect) rect.DeflateRect(-6-SHRX,6-SHRY)
You get a compile error.
This looks like a bug in MSVC compiler. This program:
void f(int, int) {}
#define SHRX -10
#define SHRY -20
#define SHRINK() f(-6-SHRX,6-SHRY)
int main()
{
SHRINK();
return 0;
}
produces an error in VC (I tried VC7.1 and VC8), but compiles fine with
Comeau. Anybody has later versions handy to check?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Hendrik Schober
- Re: #define and (brackets)
- From: Tommy
- Re: #define and (brackets)
- References:
- #define and (brackets)
- From: Gerry Hickman
- Re: #define and (brackets)
- From: David Webber
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Alan Carre
- #define and (brackets)
- Prev by Date: Re: #define and (brackets)
- Next by Date: Re: #define and (brackets)
- Previous by thread: Re: #define and (brackets)
- Next by thread: Re: #define and (brackets)
- Index(es):
Relevant Pages
|