Re: subroutine stack and C machine model



Seebs <usenet-nospam@xxxxxxxxx> writes:

On 2009-10-27, Ben Bacarisse <ben.usenet@xxxxxxxxx> wrote:
That is too narrow for my taste but I accept it is a distinction that
can be made. You stated elsewhere that constant expressions are a
syntactic construct, but the definition requires the Constraints
section so presumably you include in "syntax" the constraints whilst
excluding all other restrictions?

Not quite. Rather, I believe that, if you follow the syntax down far
enough, you can tell them apart, because constant values can be distinguished
from variables.

Well, to my mind, if you keep enough of the parse tree you can
distinguish a volatile qualified object from a non-qualified one which
was your canonical non-syntactic distinction.

My preference is simply not to treat these categories as having hard
boundaries because the specification does not seem formal enough to
support such a rigid distinction.

Could be. In which case, the claim that you can tell whether or not
something could have side effects by looking at the syntax becomes
essentially useless.

It just means there is more to discuss -- for example, pinning down
some terms before moving on. What matters to a compiler is what can
be determined from the information it has, and that is clearly more
than what you choose to call syntax. I don't mind if you want to use
a very narrow meaning, and you should not object to my using a
slightly wider one. We may even have to agree on one for convenience,
but the terms we use have no effect on what can and can not be
determined about a C program.

--
Ben.
.



Relevant Pages

  • Pythonification of the asterisk-based collection packing/unpacking syntax
    ... packing and unpacking syntax. ... In case the asterisk is not used to signal unpacking, ... type constraints throughout python as a whole; ...
    (comp.lang.python)
  • Re: subroutine stack and C machine model
    ... You stated elsewhere that constant expressions are a ... section so presumably you include in "syntax" the constraints whilst ... Rather, I believe that, if you follow the syntax down far ... determined not to be constant from syntax alone. ...
    (comp.lang.c)
  • Re: subroutine stack and C machine model
    ... Syntax is not the same as semantics! ... which could be type specifiers, "Constraints" says that there must be at ... how constant expressions are syntactic. ...
    (comp.lang.c)
  • Re: macro preprocessor semantics and the ANSI standard
    ... 'constraints' are not part of the syntax, but part of the semantics ... They are part of the syntax, but it's easier to impose them as ... Unsolicited bulk E-mail subject to legal action. ...
    (comp.lang.pl1)
  • Re: subroutine stack and C machine model
    ... You stated elsewhere that constant expressions are a ... section so presumably you include in "syntax" the constraints whilst ... Rather, I believe that, if you follow the syntax down far ... support such a rigid distinction. ...
    (comp.lang.c)