home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / gnu / gcc / help / 2313 < prev    next >
Encoding:
Text File  |  1992-10-12  |  1.4 KB  |  36 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!stanford.edu!ames!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!Urmel.Informatik.RWTH-Aachen.DE!tabaqui!dak
  3. From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
  4. Subject: Re: GCPP extension
  5. Message-ID: <dak.718929977@tabaqui>
  6. Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
  7. Nntp-Posting-Host: tabaqui
  8. Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
  9. References: <1992Oct9.144505.20396@itnsg1.cineca.it>
  10. Date: 12 Oct 92 22:46:17 GMT
  11. Lines: 23
  12.  
  13. lele@itnsg1.cineca.it (Lele Gaifax) writes:
  14.  
  15. >I was wondering on this for enough time... 
  16. >From the GNU point of view, is there valid reason to not extend the #define
  17. >syntax so to avoid using backslashes to build a long definition? Maybe an 
  18. >example would be clear:
  19.  
  20. >so why not extend the preproc to handle a more complex construct like
  21.  
  22. >#defmacro foobar(arg_one, arg_two)    {
  23. >                      if (dummy_function (arg_one)) 
  24. >                        arg_two = other_dummy (arg_two); 
  25. >                      else 
  26. >                        arg_two = arg_one; 
  27. >                    }
  28. >#endmacro
  29.  
  30. >And since this would be a GNU extension to the C language, it should disappear
  31. >if the compiler gets invoked with --ansi or similar... 
  32.  
  33. I think it is not worth the effort. However, use of inline functions under
  34. C as in C++ would be a boon. In C++ long defines are out for that reason.
  35. In fact, my preprocessor is almost only doing includes.
  36.