home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / bug-lucid-emacs / text0033.txt < prev    next >
Encoding:
Text File  |  1993-07-04  |  1.0 KB  |  29 lines

  1.  
  2.     It definitely looks like the compiler you are using has a bug. 
  3.  
  4.     The correct behaviour in your machine should be: caller still 
  5. passes c in register, but the callee copies the corresponding byte in the 
  6. register onto stack, and pass down a pointer that points to that byte on
  7. stack. It sounds like your compiler is not doing this. The object `c' is 
  8. of type `char', not `int', and the compiler shall follow the rule to treat
  9. it as type `char', ie., even though it is promoted into 4 bytes (because of
  10. the nature of RISC machine calling convention), every usage of it should 
  11. still be using only one byte unless the compiler can determine that it
  12. makes no difference either way.
  13.  
  14.     This is a compiler bug, not lucid emacs bug.
  15.  
  16.     BTW, when a function is defined with prototype, its argument is
  17. not necessarily promoted to widen type. Also, if your compiler has bug, I 
  18. would recommend you to use GCC. GCC works in our box (m88k Delta SVR4).
  19.  
  20.   void
  21.   insert_char (char c)
  22.   {
  23. !   insert_raw_string (&c, 1);
  24.   }
  25.   
  26.  
  27. --- Wilson
  28.  
  29.