Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Dave Abrahams <dave@boostpro.com> |
| Newsgroups | comp.std.c++ |
| Subject | Re: Evaluation of #elif - trying again |
| Date | Fri, 14 Oct 2011 12:02:37 -0700 (PDT) |
| Organization | unknown |
| Lines | 59 |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | james.dennett@gmail.com |
| Message-ID | <m2aa93q0o6.fsf@boostpro.com> (permalink) |
| References | <j4ijc0$gqv$1@dont-email.me> <j4j5f3$d34$1@news-rocq.inria.fr> <j5ktvu$fh7$1@dont-email.me> <f95e5976-1249-4249-a557-d5d6f7ad18a5@o35g2000prn.googlegroups.com> <j789bd$knt$1@dont-email.me> |
| Content-Type | text/plain |
| X-Trace | news.albasani.net Yw4GqtTIMV9cxWbJTXkUHEy9Z8d1jMwtHzK704lHnqF/J5uQOtIyhrA86/ATHlo3keycoqzwOPl0ifDzsMYI1A== |
| NNTP-Posting-Date | Fri, 14 Oct 2011 19:02:39 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="IqDMNN9dJ1Nf2X3yBojbmiRULWwOONqANwaM4E4QA+0ScKoPMYeBSMlsNNcutPdpKKmp28L0m1lqSae+4HWXERA9owpxIHtSNK+o4LFxity9ICKlcV5oSTUb6lI1Ht2U"; mail-complaints-to="abuse@albasani.net" |
| X-Mailer | Perl5 Mail::Internet v2.05 |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| Cancel-Lock | sha1:5BXdlLsnl/j7oRAC8sz0j2SuS1k= |
| X-Original-Date | Fri, 14 Oct 2011 07:20:57 -0400 |
| Xref | x330-a1.tempe.blueboxinc.net comp.std.c++:325 |
Show key headers only | View raw
on Fri Oct 14 2011, Edward Diener<eldiener-AT-tropicsoft.invalid> wrote: > On 10/12/2011 12:34 PM, David Krauss wrote: >> On Sep 25, 8:26 am, Edward Diener<eldie...@tropicsoft.invalid> wrote: > >>> >>> Having already asked for a clarification of the C standard in the >>> approprate NG I was told in no uncertain terms that the C standard is >>> not the source of the C++ standard on this issue. I am pursuing a change >>> on this issue in the C standard separately from my pursuit of this issue >>> in the C++ standard. But I have still received practically no response >>> regarding this issue in this NG regarding the interpretation in the C++ >>> standard other than your reply above, which I appreciate. I still would >>> like some definite understanding how this is treated in C++ according to >>> the C++ standard. >>> >>> So the question in my mind still remains: is an #elif expression >>> evaluated as a constant expression when its corresponding #if expression >>> is true ? >> >> I stumbled on this recently, as I'm writing a C++ preprocessor. For >> curious other readers, the corresponding comp.std.c discussion >> concluded that this is also still a defect in C. >> >> The problem is slightly broader than just expanding/interpreting >> constant expressions. Since skipped directives are only processed far >> enough to determine the nesting level, there is also the issue of >> preprocessing tokens following #else or #endif. >> >> Since I read somewhere that some obsolete code allows an "argument" to >> #endif, I decided to ignore such a construction within a skipped group >> and flag it for a peer to an interpreted group. And, for what it's >> worth, I'm not evaluating the conditions of #elif directives following >> an interpreted #if or #elif group. > > Unforunately I could never get the C++ responders on this NG to take > action for correcting the problem in C++. The best I was told was that I > had to find someone who was a member of the C++ standards committee to > take action for me and when I suggested to one responder, who may have > been a member of the C++ standards committee, that I would gladly write > up some form of document to get this corrected for C++, I received no > further response. > > Both the C and C++ standard committees make it much too hard for a > discerning C/C++ programmer to effect changes in the respective standards. Have you tried posting a defect report here? Presumably that should go on the CWG issues list and at least get considered at the next meeting. -- Dave Abrahams BoostPro Computing http://www.boostpro.com [ 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 — Previous in thread | 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