public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/47733] New: psignal (int, const? char*) in libiberty/strsignal.h
@ 2011-02-14 14:56 dilyan.palauzov at aegee dot org
  2011-06-01 15:06 ` [Bug other/47733] " jan.smets@alcatel-lucent.com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dilyan.palauzov at aegee dot org @ 2011-02-14 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: psignal (int, const? char*) in libiberty/strsignal.h
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dilyan.palauzov@aegee.org


I compile gcc with:

../gcc-4.5.2/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--enable-threads=posix --enable-languages=c,c++ --enable-targets=all
--with-newlib --with-build-time-tools=/usr/x86_64-pc-linux-gnu/bin/
--disable-shared --disable-libgomp --disable-lto --disable-libssp
--disable-libmudflap

libiberty/strsignal.c compiles differently, depending on if HAVE_PSIGNAL is
defined or not.

HAVE_PSIGNAL is nowhere defined in the whole gcc-4.5.2 tree.

In turn strsignal.c defines in all cases a function
void
psignal (int signo, char *message)

In libc-2.13 signal.h defines the function as 
void
psignal (int __sig, __const char *__s);

When I compile gcc 4.5.2 with the above configuration I get the message:
[...]
/src/gcc452-build/./gcc/xgcc -B/src/gcc452-build/./gcc/
-B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem
/usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include   
-c -DHAVE_CONFIG_H -O3  -I. -I../../../gcc-4.5.2/libiberty/../include  -W -Wall
-Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
../../../gcc-4.5.2/libiberty/strsignal.c -o strsignal.o
../../../gcc-4.5.2/libiberty/strsignal.c:554:1: error: conflicting types for
'psignal'
/usr/include/signal.h:150:13: note: previous declaration of 'psignal' was here
make[2]: *** [strsignal.o] Error 1
make[2]: Leaving directory `/src/gcc452-build/i686-pc-linux-gnu/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/src/gcc452-build'
make: *** [all] Error 2

Changing in libiberty/strsignal.c
psignal (int signo, char *message)
with
psignal (int signo, const char *message)

does solve the problem.


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

end of thread, other threads:[~2012-01-15 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 14:56 [Bug other/47733] New: psignal (int, const? char*) in libiberty/strsignal.h dilyan.palauzov at aegee dot org
2011-06-01 15:06 ` [Bug other/47733] " jan.smets@alcatel-lucent.com
2011-06-22 20:20 ` hp at gcc dot gnu.org
2011-06-22 21:31 ` hp at gcc dot gnu.org
2011-06-27 20:57 ` hp at gcc dot gnu.org
2011-06-27 21:06 ` hp at gcc dot gnu.org
2011-12-15  1:44 ` pinskia at gcc dot gnu.org
2011-12-15  1:46 ` pinskia at gcc dot gnu.org
2011-12-15  1:52 ` pinskia at gcc dot gnu.org
2012-01-15 19:24 ` pinskia at gcc dot gnu.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).