3.3 C Weirdness

David B.Anderson davea at quasar.wpd.sgi.com
Thu Sep 27 01:25:00 AEST 1990


In article <803 at sun13.scri.fsu.edu> pepke at gw.scri.fsu.edu (Eric Pepke) writes:
>In article <70109 at sgi.sgi.com> davea at quasar.wpd.sgi.com (David B.Anderson) 
>writes:
>> b) the resulting code will defininitely
>> not work on our machines if one has
>>         int x(float);
>>         int x(y) float y; { }
>
>Strange.  I have 15,000 lines of code with stuff like this out the wazoo, 
>and it seems to work fine.  Of course, the prototype is visible when the 
>function is defined.  Perhaps the compiler does the sensible thing in 
>spite of whining about it.

Yes, you are quite right.  My mistake.  However it's still not
a good idea to do this, since it is a clear violation of the ANSI C standard.

{Apologies for the earlier misinformation....}
[ David B. Anderson  Silicon Graphics  (415)335-1548  davea at sgi.com ]
[``What can go wrong?''                          --Calvin and Hobbes]



More information about the Comp.sys.sgi mailing list