Re: [RFC/RFA] gdb extension for Harvard architectures

Frank Ch. Eigler
2001-10-03T16:51:00Z

cagney wrote:

: > - doesn't change the meaning of any valid C expressions
:
: Is this a valid C expression?
:
: int foo();
: char *c = foo;
:
: I.e. does ISO C define its semantics?

A mere pointer assignment? There is not much possible semantics there
to worry about. Yes, it'd be illegal to dereference the char* pointer.
It may be legal to cast it back to "int (*) ()" and call through that,
if "char*" is as big as "int (*) ()".

Some of this discussion seems to me to focus too much on how
fundamentally nonsensical operations may be expressed in nonsensical
gdb expression syntax.

- FChE