From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27609 invoked by alias); 14 Feb 2011 14:55:22 -0000 Received: (qmail 27594 invoked by uid 22791); 14 Feb 2011 14:55:21 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 14:55:14 +0000 From: "dilyan.palauzov at aegee dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/47733] New: psignal (int, const? char*) in libiberty/strsignal.h X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dilyan.palauzov at aegee dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 14 Feb 2011 14:56:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg01682.txt.bz2 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.