home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.help
- 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
- From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
- Subject: Re: GCPP extension
- Message-ID: <dak.718929977@tabaqui>
- Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
- Nntp-Posting-Host: tabaqui
- Organization: Rechnerbetrieb Informatik / RWTH Aachen
- References: <1992Oct9.144505.20396@itnsg1.cineca.it>
- Date: 12 Oct 92 22:46:17 GMT
- Lines: 23
-
- lele@itnsg1.cineca.it (Lele Gaifax) writes:
-
- >I was wondering on this for enough time...
- >From the GNU point of view, is there valid reason to not extend the #define
- >syntax so to avoid using backslashes to build a long definition? Maybe an
- >example would be clear:
-
- >so why not extend the preproc to handle a more complex construct like
-
- >#defmacro foobar(arg_one, arg_two) {
- > if (dummy_function (arg_one))
- > arg_two = other_dummy (arg_two);
- > else
- > arg_two = arg_one;
- > }
- >#endmacro
-
- >And since this would be a GNU extension to the C language, it should disappear
- >if the compiler gets invoked with --ansi or similar...
-
- I think it is not worth the effort. However, use of inline functions under
- C as in C++ would be a boon. In C++ long defines are out for that reason.
- In fact, my preprocessor is almost only doing includes.
-