Article View: gnu.gcc.help
Article #461GCPP extension
From: Lele Gaifax
Date: Fri, 09 Oct 1992 14:45
Date: Fri, 09 Oct 1992 14:45
41 lines
1785 bytes
1785 bytes
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:
Often we use definition like this
#define foobar(arg_one, arg_two) { \
if (dummy_function (arg_one)) \
arg_two = other_dummy (arg_two); \
else \
arg_two = arg_one; \
}
this is very difficult to edit, boring, and often one forget the backslash, ...
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...
To quote the GNU standards:
"Much of what is called "portability" in the Unix world refers to
porting to different Unix versions. This is a secondary consideration
for GNU software, because its primary purpose is to run on top of one
and only one kernel, the GNU kernel, compiled with one and only one C
compiler, the GNU C compiler."
thanx for you opinion,
lele.
--
Lele Gaifax - lele@itnsg1.cineca.it
...calling Emacs convenient, of course, is like calling oxygen useful
Rens Troost
Technical Details
Message-ID:
<1992Oct9.144505.20396@itnsg1.cineca.it>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!rpi!ghost.dsi.unimi.it!itnsg1.cineca.it!leleShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!rpi!ghost.dsi.unimi.it!itnsg1.cineca.it!lele From: lele@itnsg1.cineca.it (Lele Gaifax) Newsgroups: gnu.gcc.help Subject: GCPP extension Message-ID: <1992Oct9.144505.20396@itnsg1.cineca.it> Date: 9 Oct 92 14:45:05 GMT Organization: Laboratorio di Fisica Computazionale, INFM. Trento Italia Lines: 41