public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/25914]  New: strsignal.c:558: warning: comparison between signed and unsigned
@ 2006-01-22 21:26 danglin at gcc dot gnu dot org
  2006-01-23 14:51 ` [Bug other/25914] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2006-01-22 21:26 UTC (permalink / raw)
  To: gcc-bugs

/mnt/gnu/gcc-3.3/objdir/./gcc/xgcc -B/mnt/gnu/gcc-3.3/objdir/./gcc/
-B/opt/gnu64
/gcc/gcc-4.2.0/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-4.2.0/hppa64-hp-hpu
x11.11/lib/ -isystem /opt/gnu64/gcc/gcc-4.2.0/hppa64-hp-hpux11.11/include
-isyst
em /opt/gnu64/gcc/gcc-4.2.0/hppa64-hp-hpux11.11/sys-include -c -DHAVE_CONFIG_H
-
O2 -g -O2  -I. -I../../../gcc/libiberty/../include  -W -Wall -pedantic
-Wwrite-s
trings -Wstrict-prototypes ../../../gcc/libiberty/strsignal.c -o strsignal.o
../../../gcc/libiberty/strsignal.c: In function 'psignal':
../../../gcc/libiberty/strsignal.c:558: warning: comparison between signed and
u
nsigned

#ifndef HAVE_PSIGNAL

void
psignal (unsigned signo, char *message)
{
  if (signal_names == NULL)
    {
      init_signal_tables ();
    }
  if ((signo <= 0) || (signo >= sys_nsig))

I'm not sure whether the if should be fixed or the type of signo
should be changed to int.  The first argument in the linux implementation
has the type of int.


-- 
           Summary: strsignal.c:558: warning: comparison between signed and
                    unsigned
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa*-*-hpux*
  GCC host triplet: hppa*-*-hpux*
GCC target triplet: hppa*-*-hpux*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

* [Bug other/25914] strsignal.c:558: warning: comparison between signed and unsigned
  2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
@ 2006-01-23 14:51 ` pinskia at gcc dot gnu dot org
  2006-01-26 21:56 ` sje at cup dot hp dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-23 14:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-23 14:51 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-23 14:51:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

* [Bug other/25914] strsignal.c:558: warning: comparison between signed and unsigned
  2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
  2006-01-23 14:51 ` [Bug other/25914] " pinskia at gcc dot gnu dot org
@ 2006-01-26 21:56 ` sje at cup dot hp dot com
  2006-01-26 23:09 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sje at cup dot hp dot com @ 2006-01-26 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sje at cup dot hp dot com  2006-01-26 21:56 -------
It looks like linux (including LSB 3.1 standard) uses an int argument in
psignal
and Apple/BSD systems use an unsigned int argument.  I don't see psignal in any
ANSI or POSIX standards.

The libiberty version is currently an unsigned int.


-- 

sje at cup dot hp dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sje at cup dot hp dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

* [Bug other/25914] strsignal.c:558: warning: comparison between signed and unsigned
  2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
  2006-01-23 14:51 ` [Bug other/25914] " pinskia at gcc dot gnu dot org
  2006-01-26 21:56 ` sje at cup dot hp dot com
@ 2006-01-26 23:09 ` pinskia at gcc dot gnu dot org
  2006-01-27  0:12 ` dave at hiauly1 dot hia dot nrc dot ca
  2006-02-22 15:22 ` danglin at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-26 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-01-26 23:09 -------
It is unsigned int on Solaris too.  Seems like glibc/Linux is the out man out
really as this was developed by the BSD folks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

* [Bug other/25914] strsignal.c:558: warning: comparison between signed and unsigned
  2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-01-26 23:09 ` pinskia at gcc dot gnu dot org
@ 2006-01-27  0:12 ` dave at hiauly1 dot hia dot nrc dot ca
  2006-02-22 15:22 ` danglin at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-01-27  0:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca  2006-01-27 00:12 -------
Subject: Re:  strsignal.c:558: warning: comparison between signed and unsigned

> It is unsigned int on Solaris too.  Seems like glibc/Linux is the out man out
> really as this was developed by the BSD folks.

The Linux manpage says:

CONFORMING TO
       4.3BSD

I don't have access to a 4.3BSD system but DEC Ultrix is unsigned,
so it looks to me like the Linux folks have messed up.  It's unfortunate
but the Linux version is what made it to ISO 23360.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

* [Bug other/25914] strsignal.c:558: warning: comparison between signed and unsigned
  2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-01-27  0:12 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-02-22 15:22 ` danglin at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2006-02-22 15:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from danglin at gcc dot gnu dot org  2006-02-22 15:22 -------
The libiberty version is documented as unsigned and has been this
way for many years.  The Open Group has a strawman proposal which may
be submitted to the Austin Group for addition to POSIX in its next
release.  It uses a signed int.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25914


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

end of thread, other threads:[~2006-02-22 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-22 21:26 [Bug other/25914] New: strsignal.c:558: warning: comparison between signed and unsigned danglin at gcc dot gnu dot org
2006-01-23 14:51 ` [Bug other/25914] " pinskia at gcc dot gnu dot org
2006-01-26 21:56 ` sje at cup dot hp dot com
2006-01-26 23:09 ` pinskia at gcc dot gnu dot org
2006-01-27  0:12 ` dave at hiauly1 dot hia dot nrc dot ca
2006-02-22 15:22 ` danglin at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).