home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / gcc / help / 1797 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.3 KB

  1. Path: sparky!uunet!darwin.sura.net!mips!swrinde!cs.utexas.edu!mercury.unt.edu!sol!kenc
  2. From: kenc@sol.acs.unt.edu (Ken Corey - Operator)
  3. Newsgroups: gnu.gcc.help
  4. Subject: cpp question:  (Yes, I try to duck flames at the end)
  5. Message-ID: <1992Jul28.192753.19315@mercury.unt.edu>
  6. Date: 28 Jul 92 19:27:53 GMT
  7. Sender: usenet@mercury.unt.edu (UNT USENet Adminstrator)
  8. Organization: University of North Texas
  9. Lines: 32
  10.  
  11. Well, I was trying to compile a program yesterday, and ran into a problem I
  12. never saw before.  The c file had the following definition:
  13.  
  14.  #define MUL(x,y)  ((x) << (y/**/Shift))
  15.  
  16. Which, when this line of code is processed:
  17.  
  18.  x = MUL(this,that);
  19.  
  20. will return this after CPP:
  21.  
  22.  x = ((this) << (that Shift));
  23.                      ^
  24.                      |
  25.               This is the problem.
  26.  
  27. The result that's desired is the variable 'thatShift' in this case.
  28.  
  29. Is there a setting for the gcc frontend that will help this along?  (the man
  30. page didn't say much of nothing about cpp.)
  31.  
  32. Anyway, I'd appreciate it if y'all could email any answers, as I don't
  33. regularly read this group.
  34.  
  35. -Thanks! 
  36.  Ken
  37.  
  38. -- 
  39. Ken == kenc@sol.acs.unt.edu == kenc@vaxb.acs.unt.edu
  40.  Rule of the Great:
  41.      When people you greatly admire appear to be thinking deep
  42.      thoughts, they probably are thinking about lunch.
  43.