Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Ian Lance Taylor <ian@airs.com>
Cc: binutils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: enum { BFD_ENDIAN_BIG, ...}
Date: Mon, 17 Dec 2001 07:30:00 -0000	[thread overview]
Message-ID: <3C1E0F79.6050209@cygnus.com> (raw)
In-Reply-To: <siheqq1jpg.fsf@daffy.airs.com>

> Andrew Cagney <ac131313@cygnus.com> writes:

> I didn't anticipate that the enum would be used in a field which was
> not initialized in a normal fashion.  I personally pretty much never
> privilege a particular element of an enum; either the enum matches an
> external definition, in which case all elements have explicit values,
> or the enum does not match an external definition, in which case none
> of the elements have explicit values.  I don't normally initialize
> structures using memset(0); I normally explicitly initialize all
> fields in one way or another.


I'm currently ``fixing'' gdb to explicitly initialize the relevant field.


>> GDB, which is trying to eliminate its dependance on those host
>> dependant macros is suffering minor heart burn as a result of the
>> difference - it has been assuming that ZERO indicated an uninitialized
>> (roughly BFD_ENDIAN_UNKNOWN) value.

> It should not break BFD to change the order of the enum values.  If it
> does, I would consider that to be a bug.  If you do change the order,
> I would (obviously) recommend an explicit = 0, and a comment
> indicating why BFD_ENDIAN_UNKNOWN has a zero value.


I'll think about it.  While something assuming zero might be a bug, I 
really don't want to break BFD.

thanks for the history,
Andrew


  reply	other threads:[~2001-12-17 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-16 17:23 Andrew Cagney
2001-12-16 21:49 ` Ian Lance Taylor
2001-12-17  7:30   ` Andrew Cagney [this message]
2001-12-17 16:29     ` Alan Modra
2001-12-17 16:46       ` Richard Henderson
2001-12-17 17:44         ` Alan Modra

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=3C1E0F79.6050209@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=binutils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=ian@airs.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