[comp.lang.c] #define int long

shap@bunker.UUCP (Joseph D. Shapiro) (03/15/88)

In article <22314ad9@ralf.home>, Ralf.Brown@B.GP.CS.CMU.EDU writes:
> #define int long
> 
> Need I say more?

There is a big reason why this wont work:

All of the library routines expect 'int's to be on the stack when they
are invoked.

Since you will now be calling them with 'long's, and they don't know
it, what they will really get is half of your new long argument for the
intended int, and then the other half where it was expecting some other
argument.

Of course, if there is a full set of function templates defined BEFORE
you define int to long, the compiler will fix it up.  But anyone who
could spend the time to provide templates could also use longs when
they meant longs, etc.

-- 
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Joe Shapiro					"My other car is a turbo...
Bunker Ramo Olivetti				 too."
{decvax,yale,philabs,oliveb}!bunker!shap