Re: What is the meaning of an expression?

Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Wed, 19 Jan 2022 11:54:00 +0100

          From comp.compilers

Related articles
[5 earlier articles]
Re: What is the meaning of an expression? gneuner2@comcast.net (George Neuner) (2022-01-15)
Re: What is the meaning of an expression? matt.timmermans@gmail.com (matt.ti...@gmail.com) (2022-01-15)
Re: What is the meaning of an expression? 0xe2.0x9a.0x9b@gmail.com (Jan Ziak) (2022-01-16)
Re: What is the meaning of an expression? 0xe2.0x9a.0x9b@gmail.com (Jan Ziak) (2022-01-17)
Re: What is the meaning of an expression? 0xe2.0x9a.0x9b@gmail.com (Jan Ziak) (2022-01-18)
Re: What is the meaning of an expression? gah4@u.washington.edu (gah4) (2022-01-18)
Re: What is the meaning of an expression? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-01-19)
Re: What is the meaning of an expression? 0xe2.0x9a.0x9b@gmail.com (Jan Ziak) (2022-01-19)
Re: What is the meaning of an expression? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2022-01-19)
Re: What is the meaning of an expression? tkoenig@netcologne.de (Thomas Koenig) (2022-01-19)
Re: What is the meaning of an expression? gah4@u.washington.edu (gah4) (2022-01-19)
Re: What is the meaning of an expression? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-01-20)
Re: What is the meaning of an expression? tkoenig@netcologne.de (Thomas Koenig) (2022-01-22)
[2 later articles]
| List of all articles for this month |
From: Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups: comp.compilers
Date: Wed, 19 Jan 2022 11:54:00 +0100
Organization: Compilers Central
References: <AdgJPKhi/NiNfECvRNaA6+4Wq/M8OQ==> 22-01-052 22-01-060 22-01-066 22-01-067 22-01-068
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="26114"; mail-complaints-to="abuse@iecc.com"
Keywords: optimize
Posted-Date: 19 Jan 2022 10:13:33 EST
In-Reply-To: 22-01-068
Content-Language: de-DE

On 1/19/22 12:18 AM, gah4 wrote:


> So, back to anthropomorphic computers and logical
> inconsistencies. How good are compilers, especially ones
> that evaluate constant expressions at compile time, at
> dealing with logic failure?


Optimization is a special science. A compiler might evaluate a constant
expression properly, in the sense that evaluation at runtime might fail
due to overflows of too narrow types in compiled code.


> And especially, as the question
> needs, expressions that don't have a value?


Aren't these called *statements*?
Syntax does not normally allow for expressions without values,
semantics disallow the use of subroutines without a return type as part
of an expression.


Expressions always have a value, but if that value is not used further
then the compiler can ignore that part of the source code. Problems can
arise from unrecognized side effects or exceptions eliminated by dead
code elimination.


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.