Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: constant expressions Message-ID: <13607@smoke.BRL.MIL> Date: 17 Aug 90 18:40:02 GMT References: <1958@rossignol.Princeton.EDU> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <1958@rossignol.Princeton.EDU> drh@cs.Princeton.EDU (Dave Hanson) writes: >So it appears that, where the standard says that the compiler CAN >compute constants at translation time, the standard almost lies. >The compiler MUST compute constants at translation time. >This is unfortunate (because a cross-compiler will become difficult). >(It's not quite a lie because the standard's words don't contradict each >other, only the implications do. Why say "can" when it means "must"?) The problem is that you are applying an unjustified interpretation to the wording of the 3.4 Description section. That sentences simply explains what constant expressions are all about; it cannot reasonably be interpreted as granting any additional license to the implementation. It does promise PROGRAMMERS that it is safe to use constant expressions.