From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10148 invoked by alias); 12 Mar 2004 21:38:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10138 invoked from network); 12 Mar 2004 21:38:10 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 12 Mar 2004 21:38:10 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B1uM3-0000pq-H6; Fri, 12 Mar 2004 16:38:07 -0500 Date: Fri, 12 Mar 2004 21:38:00 -0000 From: Daniel Jacobowitz To: Manoj Iyer Cc: gdb@sources.redhat.com Subject: Re: compiler error on PPC64 Message-ID: <20040312213807.GA3177@nevyn.them.org> Mail-Followup-To: Manoj Iyer , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00123.txt.bz2 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