public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: eliminate warnings from c-opts.c
@ 2007-07-21 23:36 Ben Elliston
  2007-07-25 11:21 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Elliston @ 2007-07-21 23:36 UTC (permalink / raw)
  To: gcc-patches

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
<machine>-protos.h header.  However, this seems too obvious, so I
suspect I'm wrong.  :-)

Ben


2007-07-22  Ben Elliston  <bje@au.ibm.com>

	* 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

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

end of thread, other threads:[~2007-07-26 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-21 23:36 PATCH: eliminate warnings from c-opts.c Ben Elliston
2007-07-25 11:21 ` Daniel Jacobowitz
2007-07-25 23:11   ` Ben Elliston
2007-07-26 20:51   ` Kaveh R. GHAZI

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).