* compiler error on PPC64
@ 2004-03-12 21:31 Manoj Iyer
2004-03-12 21:38 ` Daniel Jacobowitz
2004-03-12 21:38 ` Manoj Iyer
0 siblings, 2 replies; 4+ messages in thread
From: Manoj Iyer @ 2004-03-12 21:31 UTC (permalink / raw)
To: gdb
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.
Thanks
Manoj Iyer
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: compiler error on PPC64
2004-03-12 21:31 compiler error on PPC64 Manoj Iyer
@ 2004-03-12 21:38 ` Daniel Jacobowitz
2004-03-12 21:43 ` Manoj Iyer
2004-03-12 21:38 ` Manoj Iyer
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-03-12 21:38 UTC (permalink / raw)
To: Manoj Iyer; +Cc: gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: compiler error on PPC64
2004-03-12 21:38 ` Daniel Jacobowitz
@ 2004-03-12 21:43 ` Manoj Iyer
0 siblings, 0 replies; 4+ messages in thread
From: Manoj Iyer @ 2004-03-12 21:43 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
Yes I totally agree... was not sure if they were re-defined for a reason,
Coz on RHEL3 this does not happen (I am 90% certain) ...
--
Manoj
On Fri, 12 Mar 2004, Daniel Jacobowitz wrote:
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: compiler error on PPC64
2004-03-12 21:31 compiler error on PPC64 Manoj Iyer
2004-03-12 21:38 ` Daniel Jacobowitz
@ 2004-03-12 21:38 ` Manoj Iyer
1 sibling, 0 replies; 4+ messages in thread
From: Manoj Iyer @ 2004-03-12 21:38 UTC (permalink / raw)
To: gdb
Sorry forgot to add... This is using GDB 6.1 sources from CVS.
--
Manoj
On Fri, 12 Mar 2004, 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.
>
> Thanks
> Manoj Iyer
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-12 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-12 21:31 compiler error on PPC64 Manoj Iyer
2004-03-12 21:38 ` Daniel Jacobowitz
2004-03-12 21:43 ` Manoj Iyer
2004-03-12 21:38 ` Manoj Iyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox