home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / sun / apps / 1599 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  1.5 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!mips!darwin.sura.net!jvnc.net!nuscc!solomon.technet.sg!ctan
  2. From: ctan@solomon.technet.sg (Tan Chee Weei)
  3. Newsgroups: comp.sys.sun.apps
  4. Subject: strange C++ 3.0 warnings ?
  5. Message-ID: <1992Aug13.040319.287@nuscc.nus.sg>
  6. Date: 13 Aug 92 04:03:19 GMT
  7. Sender: usenet@nuscc.nus.sg
  8. Distribution: all
  9. Organization: National University of Singapore
  10. Lines: 19
  11.  
  12.  
  13. The Sun C++ 3.0 beta compiler seems to be issuing some warning messages 
  14. that were not present with +w in 2.1.  For example, types in func arguments
  15. declared in the form "class X *" gets a "dubious tag declaration: struct X"
  16. warning. As a result, the call of the function gets an 
  17. "argument is incompatible with prototype:arg #n" warning.
  18. Another strange behaviour of cfront is with constant variables.
  19. For eg. "const short x = -1" gets translated to a "static short x = 65535"
  20. and each assignment to x gets replaced with 65535. This may be some
  21. optimisation by cfront but as a result, an "initializer does not fit:65535"
  22. warning is issued. This is obvious since short is signed and can't
  23. store 65535 but the underlying ansi c compiler converts it to a value
  24. equivalent to -1. It's quite a roundabout way of doing things but the
  25. resulting warnings, is rather irritating, especially if it is a result
  26. of things cfront does rather than the user.  Does anyone have any explanation
  27. of these behaviour or any information to add on whether this has been
  28. fixed ot switches to set? Thanks.
  29.  
  30. CW
  31.