This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb and iso-c
- To: Jason Molenda <jason-gdb at molenda dot com>
- Subject: Re: gdb and iso-c
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Sat, 25 Mar 2000 19:24:33 -0500
- Cc: gdb at sourceware dot cygnus dot com
- References: <20000325110517.A15903@shell17.ba.best.com>
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