Topic: #endif //
Author: A.Main@dcs.warwick.ac.uk (Zefram)
Date: 1996/03/08 Raw View
Michael Cook <mcook@cognex.com> wrote:
>Is it legal to have //-style comments within a preprocessor directive? If so,
>that'd mean C++ compilers would be precluded from using ISO C preprocessors.
That is correct. Comments are converted into spaces before
preprocessing occurs. In practice, it is common for a single
preprocessor program to have two modes of operation, one in which //
starts a comment and one in which it does not. That preprocessor can
then be used for both languages. (Actually other options are needed
too, controlling which digraphs are recognised.)
-zefram
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]