This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb & ISO C (Was `textdomain warning removal')
- To: Philippe De Muyter <phdm at macqel dot be>
- Subject: Re: gdb & ISO C (Was `textdomain warning removal')
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sun, 14 May 2000 18:12:48 +1000
- CC: Michael Meissner <meissner at cygnus dot com>, bje at redhat dot com, alan at linuxcare dot com dot au, binutils at sourceware dot cygnus dot com, gdb at sourceware dot cygnus dot com, rms at fsf dot org
- Organization: Cygnus Solutions
- References: <200005130832.KAA08253@mail.macqel.be>
Philippe De Muyter wrote:
> That supposes that gcc builds out of the box on your platform. In my
> experience, that is seldom the case and I often need a good debugger to find
> why gcc crashes. And gcc comes with a .gdbinit file that thus supposes gdb
> is available before gcc :)
The decision to move GDB to ISO-C wasn't taken lightly. It was first
proposed many many years ago. Following on from that, it was decided
that GDB 4.18 would be released with a function declaration that
required ISO-C (c89) to compile. Then after waiting six months and
getting zero compilaints, K&R was dropped from the GDB coding standard.
Once reason the next GDB release is being given the 5.0 designation is
because it, and all its successors, require ISO-C.
As for the decision, it was very much pragmatic. The rationale
includes:
o The reality that the average C
programmer wouldn't even know what
K&R C was yet alone the pitfalls of
trying to get a program to build
correctly under both K%R and ISO-C.
For the maintainers we felt we had
better things to do with our time then
teach people K&R querks or fix K&R isms.
o The presense of programs that
can translate ISO-C to K&R-C and hence
allow ISO-C programs to compile using
legcay compilers.
Automake (I believe) includes such a
program. Consequently, once GDB is
converted to automake (....) that will
be provided automatically.
o All the major UNIX like OS vendors either
bundle or put up for FTP a pre-built copy
of an ISO-C compiler (typically GCC) for
their OS.
In general people don't build/boot strap
GCC, they just download it.
o People porting an OS (GNU/Linux, *BSD)
at a new platform (ex ia64) build a
cross compiler from an arbitrary stable
system (which has an ISO-C compiler).
The good old days of finding a $ARCH
system and using that systems native
compiler to bootstrap $OS onto $ARCH
are, fortunatly, long gone. (Ya!!!)
o For seriously old or rare systems, the
equally old GDB/GCC releases were still
available for download.
I should point out that, in my opinion, the above rationale applies
equally to binutils and GCC. GDB is simply serving as the fall-guy.
Finally, I will note that there are no current plans to move GDB to
either c9x or C++.
enjoy,
Andrew