Path: utzoo!mnetor!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c++ Subject: Re: C++ releases from AT&T? Message-ID: <3369@haddock.ISC.COM> Date: 7 Apr 88 19:02:43 GMT References: <254@piring.cwi.nl> <1517@dataio.Data-IO.COM> <257@piring.cwi.nl> <570@fig.bbn.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 21 In article <570@fig.bbn.com> rsalz@bbn.com (Rich Salz) writes: |He'd also like it to be able to do this: |> #ifdef NDEBUG |> const debug = 0; |> #else |> int debug; /* Set by -D command line flag */ |> #endif | |I think his last request really proves that it's an implementation |issue. What should happen if I do this: | prompt% adb -w a.out | _debug/W 1 | $q | prompt% I think that if you want the program to be able to handle that sort of tweaking, you should have declared debug with the "volatile" keyword. (In other words, I believe that in the absence of "volatile", the compiler should be free to assume that you *won't* do that.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint