Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: gdb@sources.redhat.com
Subject: Re: compiler error on PPC64
Date: Fri, 12 Mar 2004 21:38:00 -0000	[thread overview]
Message-ID: <20040312213807.GA3177@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0403122146000.17315@lazy>

On Fri, Mar 12, 2004 at 10:00:30PM +0100, Manoj Iyer wrote:
> 
> I am getting an error message from the compiler on PPC64 (gcc version
> powerpc64-linux-gcc (GCC) 3.3.3-hammer)
> 
> ppc-linux-tdep.c:956: error: parse error before numeric constant
> 
> This happens when the file is compiled as 64bit, on suse with 2.6 kernel
> headers. What I think is wrong is that, is there any reason to use
> 
> enum {
>   ELF_NGREG = 48,
>   ELF_NFPREG = 33,
>   ELF_NVRREG = 33
> };
> 
> instead of using
> 
> #define  ELF_NGREG  48
> #define  ELF_NFPREG  33
> #define  ELF_NVRREG  33
> 
> Because, in the header file,
> 
> /usr/include/asm-ppc64/elf.h:#define ELF_NGREG 48 /* includes nip, msr,
> lr, etc. */
> 
> is already defined as 48 and the compiler sees 48 = 48 in the enum and so
> complains.

Even better, the constants should be renamed not to conflict with the
copies in the system headers.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2004-03-12 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12 21:31 Manoj Iyer
2004-03-12 21:38 ` Manoj Iyer
2004-03-12 21:38 ` Daniel Jacobowitz [this message]
2004-03-12 21:43   ` Manoj Iyer

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=20040312213807.GA3177@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=manjo@austin.ibm.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