This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] Use bfd_byte in value.h


> Date: Thu, 28 Apr 2005 18:08:40 -0400
> From: Andrew Cagney <cagney@gnu.org>
> CC: gdb-patches@sources.redhat.com
> 
> Like I mentioned on gdb@, these are for warnings you get when building 
> with GCC 4 (or for that matter, any modern compiler).  vis:
> 
> cagney@tornado$ cat -n s.c
>       1  char *c;
>       2  signed char *s;
>       3  unsigned char *u;
>       4
>       5  void foo (void)
>       6  {
>       7    c = s;
>       8    c = u;
>       9    s = u;
>      10  }
> $ gcc --version
> gcc (GCC) 4.0.0 20050412 (Red Hat 4.0.0-0.42)
> ...
> $ gcc -c s.c
> s.c: In function foo:
> s.c:7: warning: pointer targets in assignment differ in signedness
> s.c:8: warning: pointer targets in assignment differ in signedness
> s.c:9: warning: pointer targets in assignment differ in signedness

But why should we solve this with bfd_byte?  Why not introduce GDB's
own data type, like gdb_byte or some such?

BFD is just a library; there's no need to pollute our name space with
BFD's.  It's IMHO unclean.

But I already said this, and was already ignored when I did, sigh...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]