home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 19047 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.4 KB

  1. Path: sparky!uunet!usc!cs.utexas.edu!tamsun.tamu.edu!cs.tamu.edu!jeffw
  2. From: jeffw@cs.tamu.edu (Jeffrey A Waller)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help: using GDB to debug G++-compiled programs
  5. Date: 12 Jan 1993 23:54:20 GMT
  6. Organization: Computer Science Dept., Texas A&M University
  7. Lines: 25
  8. Distribution: world
  9. Message-ID: <1ivlncINNi34@tamsun.tamu.edu>
  10. References: <1993Jan11.122250.23513@iti.gov.sg> <1993Jan12.014848.14135@nuscc.nus.sg>
  11. NNTP-Posting-Host: sparc47.cs.tamu.edu
  12.  
  13. In article <1993Jan12.014848.14135@nuscc.nus.sg>, suresh@papaya.iss.nus.sg (Suresh Thennarangam - Research Scholar) writes:
  14. |> Note that even then you may not be able to access inline methods
  15. |> unless you move their declaration outside the class definition.
  16.  
  17.  
  18. This may have been true of older versions, but I think -g switch causes
  19. gcc 2.2.2 to move otherwise inlined functions out of line (from the man
  20. page).
  21.  
  22.      -finline
  23.  
  24.           Pay attention the inline keyword.  Normally  the  nega-
  25.           tion  of  this option `-fno-inline' is used to keep the
  26.           compiler from expanding any functions inline.  However,
  27.           the  opposite  effect  may  be desirable when compiling
  28.           with `-g', since `-g' normally  turns  off  all  inline
  29.           function expansion.
  30.  
  31. and if -g does not turn off inlining in some case -fno-inline will.
  32. So instead of moving around you code use if necessary.
  33.  
  34. g++ -ggdb -fno-inline myC++.C -o myOut
  35.  
  36.  
  37.                         -Jeff
  38.