Re: CFGs vs. "declare variable before use"

glen herrmannsfeldt <gah@ugcs.caltech.edu>
31 May 2005 21:42:19 -0400

          From comp.compilers

Related articles
CFGs vs. "declare variable before use" devriese@cs.tcd.ie (Edsko de Vries) (2005-05-26)
Re: CFGs vs. "declare variable before use" wyrmwif@tsoft.org (SM Ryan) (2005-05-28)
Re: CFGs vs. "declare variable before use" mefrill@yandex.ru (mefrill) (2005-05-28)
Re: CFGs vs. "declare variable before use" torbenm@diku.dk (2005-05-28)
Re: CFGs vs. "declare variable before use" cfc@shell01.TheWorld.com (Chris F Clark) (2005-05-28)
Re: CFGs vs. "declare variable before use" torbenm@diku.dk (2005-05-31)
Re: CFGs vs. "declare variable before use" gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-31)
Re: CFGs vs. "declare variable before use" devriese@cs.tcd.ie (Edsko de Vries) (2005-06-02)
Re: CFGs vs. "declare variable before use" cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-02)
Re: CFGs vs. "declare variable before use" gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-04)
Re: CFGs vs. "declare variable before use" mefrill@yandex.ru (mefrill) (2005-06-04)
Re: CFGs vs. "declare variable before use" mittra@juno.com (Swapnajit Mittra) (2005-06-08)
Re: CFGs vs. "declare variable before use" sharp@cadence.com (2005-06-08)
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 31 May 2005 21:42:19 -0400
Organization: Compilers Central
References: 05-05-216 05-05-221
Keywords: parse
Posted-Date: 31 May 2005 21:42:19 EDT

Torben Ęgidius Mogensen wrote:
(snip)


> CFG's can be used to guarantee that declarations precede use: If the
> declaration dominates every use, then a variable is bound to be
> declared before use.


It seems that verilog is one language that doesn't require a variable
to be declared before it is used. (I found this out accidentally
after reporting a bug. It seems that one system would compile such
code, but the optimizer made some bad assumptions.)


In the case of verilog, though, where statements are not necessarily
executed sequentially, it isn't so obvious what "use" means.


-- glen


Post a followup to this message

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