[cfe-dev] @# microsoft extension ?

Sebastian Redl sebastian.redl at getdesigned.at
Fri Jul 20 04:40:45 PDT 2012


On 20.07.2012 12:47, Shang Yu wrote:
> OK. I think I'm misled by a typo in the help of ext_charize_microsoft
> diag which
> type #@ as @#.
> But I can comiple the same file with MSVC. Is @# really another
> Microsoft extension that is not implemented yet as Nico said ? Many
> thanks
>
Are you sure the Microsoft compiler ever sees that code? Note that big 
parts of the file are conditional on some macros. In particular, the 
part that contains @# will be ignored if BOOST_TT_PREPROCESSING_MODE is 
not defined, which should be the default.

The real question is why Clang ever sees that code or tries to interpret it.

The comments in the file indicate that you should never use 
BOOST_TT_PREPROCESSING_MODE for a real compilation. Instead, you should 
invoke GNU cpp directly to generate code. This would be why these 
directives are "escaped": so that they show up in the generated code.

Sebastian



More information about the cfe-dev mailing list