Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2013 11:29:55 +0100
From:      Bruce Cran <bruce@cran.org.uk>
To:        Benjamin Kaduk <kaduk@MIT.EDU>, sbruno@freebsd.org
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: gperf -- #define for if (0) ; else for
Message-ID:  <52650223.2020707@cran.org.uk>
In-Reply-To: <alpine.GSO.1.10.1310210011120.4934@multics.mit.edu>
References:  <1382327705.2610.9.camel@localhost> <alpine.GSO.1.10.1310210011120.4934@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/21/2013 5:13 AM, Benjamin Kaduk wrote:
>
>>     37
>>     38 /* Assume ISO C++ 'for' scoping rule.  */
>>     39 #define for if (0) ; else for
>
> StackOverflow (!) [1] suggests that they're a workaround for a bug in 
> old versions of Visual Studio.

http://msdn.microsoft.com/en-us/library/b80153d8%28v=vs.90%29.aspx also 
documents it.  Visual C++ 6 was released in 1998, which was 
unfortunately the same year as the first ISO C++ standard.

-- 
Bruce Cran



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52650223.2020707>