This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC-v2] Remove i386 low level debug register function from nm- header file.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: eliz at gnu dot org
- Cc: muller at ics dot u-strasbg dot fr, gdb-patches at sourceware dot org, pedro at codesourcery dot com
- Date: Wed, 13 May 2009 20:35:15 +0200 (CEST)
- Subject: Re: [RFC-v2] Remove i386 low level debug register function from nm- header file.
Eli Zaretskii wrote:
> > When you build on a 32-bit system, this probably won't result in
> > an error, even though it's strictly speaking still invalid C ...
>
> What is invalid C?
Assigning a function with prototype
void func (unsigned long arg);
to a function pointer with prototype
void (*ptr) (unsigned arg);
(even on platforms where "unsigned long" is the same size as
"unsigned").
> > As far as I know, those values are in fact 32-bit, so I guess
> > "unsigned" (or preferably, "unsigned int") should be OK to use.
>
> I see no need to add "int" to "unsigned", FWIW.
My comment was just for consistency with the rest of the code base.
I though we were not using plain "unsigned" anywhere else. However,
after checking the code base, it seems there's already a number of
places that do so. I don't really mind then, so I withdraw the
suggestion to use "unsigned int".
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com