home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13146 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.5 KB

  1. Path: sparky!uunet!UB.com!igor!thor!rmartin
  2. From: rmartin@thor.Rational.COM (Bob Martin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Destruction of temporaries
  5. Message-ID: <rmartin.715356661@thor>
  6. Date: 1 Sep 92 14:11:01 GMT
  7. References: <rmartin.715004480@thor> <23583@alice.att.com> <rmartin.715101472@thor> <1992Aug29.184025.328@frumious.uucp> <rmartin.715267769@thor> <23598@alice.att.com>
  8. Sender: news@Rational.COM
  9. Lines: 29
  10.  
  11. ark@alice.att.com (Andrew Koenig) writes:
  12.  
  13. |In article <rmartin.715267769@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  14.  
  15. |> Ideed.  But I think the warning is still useful.
  16.  
  17. |The unfortunate reality is that I have seen a number of development
  18. |projects that have an inflexible rule -- no warnings allowed!  That is,
  19. |they will not allow their people to ship any code that generates warnings.
  20.  
  21. |Thus, giving a compiler warning for a construct is equivalent to
  22. |banning it for those projects.
  23.  
  24. |Warnings had better be right almost all the time.
  25.  
  26. Thus, the #pragma argument.  Development environments which support a
  27. policy of no warnings will make use of either #pragmas to supress
  28. benign cases of the warning, or will fix the code so that aliases to
  29. temporaries are not created.
  30.  
  31. It is a much larger problem, IMHO, to fail to report a condition which
  32. could cause a crash.
  33.  
  34.  
  35. --
  36. Robert Martin                        Training courses offered in:
  37. R. C. M. Consulting                       Object Oriented Analysis
  38. 2080 Cranbrook Rd.                        Object Oriented Design
  39. Green Oaks, Il 60048 (708) 918-1004       C++
  40.