Re: Patch to remove undefined C code

From: Tom Leete (tleete@mountain.net)
Date: Tue Oct 17 2000 - 19:17:22 EST


[CC trimmed]

Bill Wendling wrote:
>
> Also sprach Tom Leete:
> }
> } You are correct that in C the rightmost argument is always
> } at the open end of the stack, and that varargs require that.
> } The opposite is called the Pascal convention.
> }
> Where in the standard does it say this? It's probably done most of the
> time in this fashion for convenience, but I don't believe it's in the
> standard.
>

The standard is careful to avoid implementation/ABI issues.
It doesn't specify the use of a stack at all.

Nonetheless, there exists a C convention for stack based
archs, which is as I described. Pascal convention can
accomodate varargs by indirection, but that is OT.

My point was that stack order of values is independent of
the order of evaluation.

gcc is neither dumb nor psychic. It will not honor a
sequence point which exists only in the programmer's head.

Tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:12 EST