gdb and iso-c
Chris Faylor
cgf@cygnus.com
Sat Mar 25 16:24:00 GMT 2000
On Sat, Mar 25, 2000 at 11:05:17AM -0800, Jason Molenda wrote:
>Both Tom Tromey and I have brought this up before, but I'll bring
>it up again. automake includes a program (ansi2knr) which is able
>to reformat ISO C code in to K&R code -- it would not be difficult
>to incorporate this (without switching to automake, even; just add
>it in) for targets that do not have an ISO C compiler and for which
>we cannot expect the presence of the GNU tools.
>
>I'm in favor of moving to ISO C. It's been around a very long
>time, we can move forward. But the cost of supporting older systems
>via an automated translation at compile-time is so low that it is
>silly to not add in support for it.
>
>Of course, I'm not volunteering to actually _add_ the support for it
>myself. :-) I need to start finding more free time somewhere. :-/
>
>My two cents,
I used a preprocessor called something like 'scpp' for a number of years
to provide "transparent" conversion of ISO C to K&R. You just had to
tell your C compiler to use this alternate preprocessor and everything
then worked transparently. It even allowed things like using ## for
string concatenation in macros.
If there is a lot of interest, I could dig this out and post the sources.
cgf
More information about the Gdb
mailing list