Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Edward Diener<eldiener@tropicsoft.invalid> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Evaluation of #elif - trying again |
| Date | 2011-09-11 09:13 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <j4ijc0$gqv$1@dont-email.me> (permalink) |
Since no one answered my previous post I will try again and rephrase some of my question. In code such as: #if SOME_MACRO(x) #elif ANOTHER_MACRO(y) #endif is ANOTHER_MACRO expanded and evaluated for C++ correctness even when the result of SOME_MACRO's expansion is 1. In other words what does the standard say about whether or not the C++ preprocessor considers paths which are not taken in #if - #elif - #endif and #if - #else - #endif constructs and whether the code in those untaken paths need to be valid C++ or not ? By path I also mean the evaluation of #elif in the first case when the corresponding #if is not 0. Is this considered to be purely a compiler decision that has nothing to do with the C++ standard or is there some C++ standard rule which says whether or not an untaken preprocessor path is parsed for valid C++ code ? -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Next in thread | Find similar
Evaluation of #elif - trying again Edward Diener<eldiener@tropicsoft.invalid> - 2011-09-11 09:13 -0700
Re: Evaluation of #elif - trying again Marc <marc.glisse@gmail.com> - 2011-09-11 17:47 -0700
Re: Evaluation of #elif - trying again Edward Diener<eldiener@tropicsoft.invalid> - 2011-09-25 08:26 -0700
Re: Evaluation of #elif - trying again Marc<marc.glisse@gmail.com> - 2011-09-26 09:00 -0700
Re: Evaluation of #elif - trying again David Krauss<potswa@gmail.com> - 2011-10-12 09:34 -0700
Re: Evaluation of #elif - trying again Edward Diener<eldiener@tropicsoft.invalid> - 2011-10-13 22:42 -0700
Re: Evaluation of #elif - trying again Francis Glassborow <francis.glassborow@btinternet.com> - 2011-10-14 12:02 -0700
Re: Evaluation of #elif - trying again Dave Abrahams <dave@boostpro.com> - 2011-10-14 12:02 -0700
Re: Evaluation of #elif - trying again Edward Diener<eldiener@tropicsoft.invalid> - 2011-10-15 09:30 -0700
csiph-web