Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: Slay COERCE_FLOAT_TO_DOUBLE
Date: Tue, 07 Jan 2003 18:16:00 -0000	[thread overview]
Message-ID: <20030107181620.GA24050@nevyn.them.org> (raw)
In-Reply-To: <3E1A0655.2050009@redhat.com>

On Mon, Jan 06, 2003 at 05:42:29PM -0500, Andrew Cagney wrote:
> >Stabs compilers (I only checked GCC and Sun Workshop CC, but those are the
> >two major ones) emit the call-as type in the debug information.  I.E. an
> >unprototyped function taking a float argument will have a type signature
> >that says it takes a double.  So the easy thing to do for stabs is to set
> >TYPE_FLAG_PROTOTYPED always, with appropriate commentary.  I've done this. 
> >It caused a minor bit of testsuite churn, since some ()'s became (void)'s; 
> >I
> >think that's OK, we know they are really void functions anyway.
> 
> Can you expand a bit here.  When exactly do the () become (void)? 
> Looking at the changes to stabs, mdebug and hpread it appears to reverse 
> the default for all non dwarf* cases - assume prototyped rather than 
> un-prototyped?  That's a pretty radical change and needs to be clearly 
> spelt out in at least the NEWS file.
> 
> (Like many people I'm back from a break and am only just getting to 
> these e-mails.  This is probably why there were few responses earlier.)

I did explain this but I wasn't quite verbose enough, in the paragraph above
and several others in the message you're quoting.  Let me try to be
more thorough.

* DWARF, DWARF-2: unchanged
* stabs: all functions are now marked prototyped.
   This is consistent with the debugging information emitted by Sun CC
   and by GCC.  The type emitted is only the correct way to call the
   function _if_ you assume that it is a prototyped declaration.
   It's a call-as type, not a declared-as type.  Treating it like
   a prototype gives us the correct behavior.
* mdebug, hpread: All non-C functions are marked as prototyped
   Only C of the languages supported on these targets supports
   non-prototyped functions.  This does _not_ change current behavior
   because they acheived a similar hack in their coerce methods.

The only change is that some functions _whose signature we know to have
no arguments_ are now printed as foo(void) instead of foo().  That and
COERCE_FLOAT_TO_DOUBE are what we used TYPE_FLAG_PROTOTYPED for.  It's
not a change of general impact; I'm only talking about some code in the
type pretty-printer.

For C the "assume un-prototyped" behavior was left intact, not
radically changed.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-01-07 18:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-23 14:03 Daniel Jacobowitz
2002-12-24 11:39 ` Eli Zaretskii
2003-01-04 22:38 ` Daniel Jacobowitz
2003-01-06 22:43 ` Andrew Cagney
2003-01-07 18:16   ` Daniel Jacobowitz [this message]
2003-01-07 18:05 Michael Elizabeth Chastain
2003-01-08  0:20 ` Andrew Cagney
2003-01-08  0:47   ` Daniel Jacobowitz

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=20030107181620.GA24050@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@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