From: Andrew Cagney <ac131313@redhat.com>
To: gdb@sources.redhat.com
Subject: Allow C++ or C99 in sim/*?
Date: Sat, 02 Aug 2003 00:16:00 -0000 [thread overview]
Message-ID: <3F2B02B8.3020906@redhat.com> (raw)
Hello,
Back in '95ish, I adopted ISO C 90 as its programming language for PSIM.
My decision was based on two assumptions: a C++ compiler would be more
buggy than C; the C language would be easier for a compiler to optimize
than C++; no one in their right mind still used K&R C. Over time, the
ISO C 90 assumption was gradually extended to other simulators (via
sim/igen and sim/common) and that led to the sim/ directory requiring
ISO C. This was all well before gdb/ adopted ISO C 90. History has
shown this to be a good decision.
Now, many years later, I think its time to revisit this:
Should the simulator directories allow more modern languages? I can see
several options:
- C99 which would allow C++ comments:
// a comment
and declarations anywhere:
foo (); int i; bar ()
and access to int32 et.al. types. What else?
- C++ which would also allow access to objects and (ulgh?) templates
(replacement for the sim-endian macro stuff?)
- Oh what the heck, Java and gcj ...
C99 should be a done deal. While I hate C++, making GDB developers
debug C++ code would be a good thing (TM), and there are a few chunks of
the simulator code that really shouldn't be C. Java would be, well,
interesting.
Thoughts? Coding standards?
Andrew
next reply other threads:[~2003-08-02 0:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-02 0:16 Andrew Cagney [this message]
2003-08-02 0:43 ` Daniel Jacobowitz
2003-08-02 0:47 ` David Carlton
[not found] ` <mailpost.1059783391.21631@news-sj1-1>
2003-08-02 1:30 ` cgd
2003-08-05 4:25 ` Andrew Cagney
2003-08-05 4:27 ` Daniel Jacobowitz
2003-08-02 1:11 Michael Elizabeth Chastain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F2B02B8.3020906@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox