Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [TESTSUITE] assert (char == signed char)
@ 2002-08-14 14:28 Michael Snyder
  2002-08-14 15:07 ` Neil Booth
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-08-14 14:28 UTC (permalink / raw)
  To: gdb-patches

There seem to be some tests in the testsuite that are
based on the assumption that chars are signed, and that
will fail if they are unsigned.

Eg: 
sizeof.exp: check valueof ((int) (char)) -1 == -1
(prints 255 if char == unsigned)

pointers.exp: ptype pC
(outputs "unsigned char *" if char == unsigned)

Any thoughts?  Should these be regularized to accept unsigned?
Should it be based on a configure variable?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TESTSUITE] assert (char == signed char)
  2002-08-14 14:28 [TESTSUITE] assert (char == signed char) Michael Snyder
@ 2002-08-14 15:07 ` Neil Booth
  2002-08-14 15:47   ` Michael Snyder
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Booth @ 2002-08-14 15:07 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Michael Snyder wrote:-

> There seem to be some tests in the testsuite that are
> based on the assumption that chars are signed, and that
> will fail if they are unsigned.
> 
> Eg: 
> sizeof.exp: check valueof ((int) (char)) -1 == -1
> (prints 255 if char == unsigned)
> 
> pointers.exp: ptype pC
> (outputs "unsigned char *" if char == unsigned)
> 
> Any thoughts?  Should these be regularized to accept unsigned?
> Should it be based on a configure variable?

I'd pass -fsigned-char; that's done in some other tests.

Neil.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TESTSUITE] assert (char == signed char)
  2002-08-14 15:07 ` Neil Booth
@ 2002-08-14 15:47   ` Michael Snyder
  2002-08-15 11:31     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-08-14 15:47 UTC (permalink / raw)
  To: Neil Booth; +Cc: gdb-patches

Neil Booth wrote:
> 
> Michael Snyder wrote:-
> 
> > There seem to be some tests in the testsuite that are
> > based on the assumption that chars are signed, and that
> > will fail if they are unsigned.
> >
> > Eg:
> > sizeof.exp: check valueof ((int) (char)) -1 == -1
> > (prints 255 if char == unsigned)
> >
> > pointers.exp: ptype pC
> > (outputs "unsigned char *" if char == unsigned)
> >
> > Any thoughts?  Should these be regularized to accept unsigned?
> > Should it be based on a configure variable?
> 
> I'd pass -fsigned-char; that's done in some other tests.

To gcc?  Problem is, what if it isn't gcc?  As eg. Irix cc?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [TESTSUITE] assert (char == signed char)
  2002-08-14 15:47   ` Michael Snyder
@ 2002-08-15 11:31     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-08-15 11:31 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Neil Booth, gdb-patches

> Neil Booth wrote:
> 
>> 
>> Michael Snyder wrote:-
>> 
> 
>> > There seem to be some tests in the testsuite that are
>> > based on the assumption that chars are signed, and that
>> > will fail if they are unsigned.

That isn't correct.

>> > Eg:
>> > sizeof.exp: check valueof ((int) (char)) -1 == -1
>> > (prints 255 if char == unsigned)

sizeof.exp's purpose in life is to check that GDB and the running 
program agree about the funamental points of life (such as the sizeof an 
int or the signof char).

>> > pointers.exp: ptype pC
>> > (outputs "unsigned char *" if char == unsigned)
>> >
>> > Any thoughts?  Should these be regularized to accept unsigned?
>> > Should it be based on a configure variable?
> 
>> 
>> I'd pass -fsigned-char; that's done in some other tests.

That would be silly :-)   The failure strongly suggests that something 
is skewiff.

> To gcc?  Problem is, what if it isn't gcc?  As eg. Irix cc?

Michael, I think you might have a GDB bug.

Andrew



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-15 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-14 14:28 [TESTSUITE] assert (char == signed char) Michael Snyder
2002-08-14 15:07 ` Neil Booth
2002-08-14 15:47   ` Michael Snyder
2002-08-15 11:31     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox