Article View: comp.std.c
Article #1609Re: constant expressions
From: Doug Gwyn
Date: Fri, 17 Aug 1990 18:40
Date: Fri, 17 Aug 1990 18:40
13 lines
1277 bytes
1277 bytes
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.
Technical Details
Message-ID:
<13607@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwynReferences:
<1958@rossignol.Princeton.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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