$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [preprocessor] Sequences vs. All Other Data Structures
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2012-04-25 08:20:08
On Tue, 24 Apr 2012 19:46:15 +0000, Stephan T. Lavavej wrote:
> [Paul A. Bristow]
>> But I haven't understood if there will be grief from existing macro
>> code if the Microsoft fix it?
> 
> Probably (VC preprocesses billions of lines of code). But if I were a
> compiler dev, I'd deal with it with pragmas (superior to compiler
> options, because a header could push/pop requests for preprocessor
> conformance).
I actually don't think this would work very well.  Remember we're talking 
about macros here and, in particular, libraries which *define* macros for 
users to use.  To handle that in a way that scales with pragmas (or even 
_Pragmas), you'd have to be "remembering" the pragma state of the 
definition and changing the algorithm mid-replacement (which sounds like 
more bugs, not less).  Even if that worked, I wouldn't use pragmas either--
especially not pragmas to make the compiler do what it already should do 
by default.  The best case scenario, if you want to support legacy mode: 
compiler switch to *disable* a compliant preprocessor.  I.e. do the right 
thing _by default_ (just like with for-loop scoping).  That, of course, 
means fixing the Windows headers (which, BTW, need to be printed, the 
prints burned, and then deleted for their wanton macro abuse).  If the 
preprocessor works the way it should, most macro uses that currently work 
will still work.  The ones that won't will either be fancier than is 
typical or rely on bad (or missing) implementation of the early phases of 
translation (e.g. macro-formed comments).
-Paul