CompuServe Messages

Stack size calc

#: 132295 S10/ProgrammingForum unknown
    28-Jun-88 03:43:14
Sb: #132239-Stack size calc
Fm: Vic Wagner 76046,3004
To: Scott Ballantyne 70066,603

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

As I gather, the ONLY reason that C 'allows' for right to left evaluation is because Ritchie INSISTED that the calling sequence be: push, push, push, call. On a downards growing stack (assuming that you want the arguments to appear as a structure of similar composition in memory) that means to evaluate the arguments from right to left. ***NOTE*** this is SAME person who INSISTS that the epression: c = *a++ + *a++ is allowed to be equivalent to: c = *a+*a; a+=2; in that the multiple ++ operators can be 'optimized' into one operation. If you have such persons designing lanugages, it's no wonder there are ambiguities and silliness. <pause in editorial comment>