|Semantic Checking - C firstname.lastname@example.org (johnvoltaire) (2005-01-30)|
|Re: Semantic Checking - C email@example.com (2005-02-03)|
|Re: Semantic Checking - C firstname.lastname@example.org (2005-02-03)|
|Re: Semantic Checking - C email@example.com (Jeremy Wright) (2005-02-03)|
|Re: Semantic Checking - C firstname.lastname@example.org (jacob navia) (2005-02-03)|
|Re: Semantic Checking - C email@example.com (Neal Wang) (2005-02-03)|
|Re: Semantic Checking - C firstname.lastname@example.org (Tommy Thorn) (2005-02-03)|
|Re: Semantic Checking - C email@example.com (2005-02-11)|
|From:||firstname.lastname@example.org (Nick Maclaren)|
|Date:||3 Feb 2005 22:39:40 -0500|
|Organization:||University of Cambridge, England|
|Posted-Date:||03 Feb 2005 22:39:40 EST|
johnvoltaire <email@example.com> wrote:
>1. We are trying to improve the semantic analysis of a particular
>compiler, and we need to identify the errors that compilers usually
>can or cannot detect. Please take time to review the following list of
>errors we've gathered and check if any or all of them belongs to the
>semantic checking routine during compilation/runtime. ...
Well, I could, but why should I do your work for you for no pay?
Being soft-hearted, I will do some of it.
>2. The process we are planning to do is to make a static semantic
>checking of C programs so that these kind of semantic errors would not
>occur upon execution the program. ...
As many compilers do, including gcc and most high-quality ones.
>From what we've understand, static semantic checking refers to the
>analysis of expected program meaning or flow before
>compilation/execution, while dynamic semantic checking refers to the
>analysis during execution. Could anyone affirm on these?
It is as good a set of definitions as any.
>Is there anyone here that we could consult or discuss with regards to
Almost certainly. But you should start by making it clear what basis
you are assuming - e.g. commercial consultancy, asking for free advice
>Common semantic errors in C language:
>1. Use of function without function prototypes
>2. Code with no effect (dead code)
Not errors and the former is always syntactic not semantic.
>12. No identifiers or variables are used twice in the same block or
>13. The number and types of arguments in a function call must be the
>same as the number and types of the prototypes
>14. A return statement must not have a return value unless it appears
>in the function prototype that is declared to return a value
>15. Break statements appear outside enclosing constructs where a break
>statement may appear
Those (and others) are all syntactic errors where the C standard
requires the compiler to diagnose them statically.
Return to the
Search the comp.compilers archives again.