home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16170 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.4 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!news.dell.com!math.utexas.edu!ut-emx!jamshid
  2. From: jamshid@ut-emx.uucp (Jamshid Afshar)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Debugging output
  5. Summary: call me crazy, but relying on compiler bugs is not a good idea
  6. Message-ID: <83463@ut-emx.uucp>
  7. Date: 12 Nov 92 18:40:30 GMT
  8. References: <Bx9369.3zL@cs.uiuc.edu> <1992Nov6.135017.6870@news2.cis.umn.edu> <BxAz2L.n4M@cs.uiuc.edu>
  9. Reply-To: jamshid@emx.utexas.edu
  10. Distribution: usa
  11. Organization: The University of Texas at Austin; Austin, Texas
  12. Lines: 23
  13.  
  14. In article <BxAz2L.n4M@cs.uiuc.edu> pjl@cs.uiuc.edu (Paul Lucas) writes:
  15. ]In <1992Nov6.135017.6870@news2.cis.umn.edu> hansen@deci.cs.umn.edu (David M. Hansen) writes:
  16. ]>>     #ifdef DEBUG
  17. ]>>     #    define    CDEBUG    if ( debug ) cerr
  18. ]>>     #else
  19. ]>>     #    define    CDEBUG    //
  20. ]>>     #endif
  21. ]>>     CDEBUG << "here\n";
  22.  
  23. ]>It is a bug because it means you have to be _very_ careful about how you 
  24. ]>comment your code.  For example, [...]
  25.  
  26. ]*****>    I already pointed out that this only works on C++-ignorant
  27. ]    preprocessors; the above example is a well-known pitfall and I
  28. ]    consider it irrelevant.  You always have to do everything
  29. ]    carefully.
  30.  
  31. The only thing irrelevant here are your continued assurances that it
  32. works on some broken C++ implementations.  So what?  Your code is
  33. wrong.  Why even present, much less defend, your solution?
  34.  
  35. Jamshid Afshar
  36. jamshid@emx.utexas.edu
  37.