From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4561 invoked by alias); 21 Jul 2007 21:27:29 -0000 Received: (qmail 4553 invoked by uid 22791); 21 Jul 2007 21:27:29 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp06.au.ibm.com (HELO ausmtp06.au.ibm.com) (202.81.18.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Jul 2007 21:27:27 +0000 Received: from sd0109e.au.ibm.com (d23rh905.au.ibm.com [202.81.18.225]) by ausmtp06.au.ibm.com (8.13.8/8.13.8) with ESMTP id l6LLS9hv2613318 for ; Sun, 22 Jul 2007 07:28:10 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.250.242]) by sd0109e.au.ibm.com (8.13.8/8.13.8/NCO v8.4) with ESMTP id l6LLUtfD204432 for ; Sun, 22 Jul 2007 07:30:55 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6LLRMRl031741 for ; Sun, 22 Jul 2007 07:27:22 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av01.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l6LLRMPB031738 for ; Sun, 22 Jul 2007 07:27:22 +1000 Received: from [9.185.86.25] (unknown [9.185.86.25]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by ozlabs.au.ibm.com (Postfix) with ESMTP id 51E3073515 for ; Sun, 22 Jul 2007 07:27:20 +1000 (EST) Subject: PATCH: eliminate warnings from c-opts.c From: Ben Elliston To: gcc-patches@gcc.gnu.org Content-Type: text/plain Date: Sat, 21 Jul 2007 23:36:00 -0000 Message-Id: <1185053238.32204.12.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01635.txt.bz2 c-opts.c invokes C_COMMON_OVERRIDE_OPTIONS if it is defined. In most ports that use this target macro, it is defined to be a do/while (0) expression. The spu-elf target defines this macro to be the name of a function (prototyped in spu-protos.h). Without this patch, the compiler warns about the lack of a prototype for the function where it is invoked from c-opts.c. While I was at it, I found the internals manual contained a FIXME comment about the tm_p.h header that doesn't seem right to me: FIXME: why is such a separate header necessary? Unless I'm mistaken, it is done this way so that GCC sources can include an independently named "tm_p.h" without needing to know the name of the -protos.h header. However, this seems too obvious, so I suspect I'm wrong. :-) Ben 2007-07-22 Ben Elliston * c-opts.c: Include tm_p.h. * doc/configfiles.texi (Configuration Files): Remove FIXME. Index: c-opts.c =================================================================== --- c-opts.c (revision 126810) +++ c-opts.c (working copy) @@ -40,6 +40,7 @@ Software Foundation, 51 Franklin Street, #include "options.h" #include "mkdeps.h" #include "target.h" +#include "tm_p.h" #ifndef DOLLARS_IN_IDENTIFIERS # define DOLLARS_IN_IDENTIFIERS true Index: doc/configfiles.texi =================================================================== --- doc/configfiles.texi (revision 126810) +++ doc/configfiles.texi (working copy) @@ -67,5 +67,4 @@ machine. @item @file{tm_p.h}, which includes the header @file{@var{machine}-protos.h} that contains prototypes for functions in the target @file{.c} file. -FIXME: why is such a separate header necessary? @end itemize