* 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
* Re: PATCH: eliminate warnings from c-opts.c
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
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-07-25 11:21 UTC (permalink / raw)
To: Ben Elliston; +Cc: gcc-patches
On Sun, Jul 22, 2007 at 07:27:18AM +1000, Ben Elliston wrote:
> 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. :-)
I think the question is relative to tm.h (and it has something to do
with which files include one and not the other).
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: eliminate warnings from c-opts.c
2007-07-25 11:21 ` Daniel Jacobowitz
@ 2007-07-25 23:11 ` Ben Elliston
2007-07-26 20:51 ` Kaveh R. GHAZI
1 sibling, 0 replies; 4+ messages in thread
From: Ben Elliston @ 2007-07-25 23:11 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gcc-patches
On Wed, 2007-07-25 at 07:17 -0400, Daniel Jacobowitz wrote:
> > 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. :-)
>
> I think the question is relative to tm.h (and it has something to do
> with which files include one and not the other).
OK, so let's ignore the doc change I proposed. Is the patch to
eliminate the warning going about it the right way?
Cheers, Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: eliminate warnings from c-opts.c
2007-07-25 11:21 ` Daniel Jacobowitz
2007-07-25 23:11 ` Ben Elliston
@ 2007-07-26 20:51 ` Kaveh R. GHAZI
1 sibling, 0 replies; 4+ messages in thread
From: Kaveh R. GHAZI @ 2007-07-26 20:51 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Ben Elliston, gcc-patches
On Wed, 25 Jul 2007, Daniel Jacobowitz wrote:
> On Sun, Jul 22, 2007 at 07:27:18AM +1000, Ben Elliston wrote:
> > 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. :-)
>
> I think the question is relative to tm.h (and it has something to do
> with which files include one and not the other).
I recall something similar (perhaps having to do with cross-compilers?)
Anyway, here is the patch which created the tm_p.h mechanism, but I didn't
see the thread where the reationale was discussed. Perhaps someone can
dig it up, and for posterity we can insert a comment.
http://gcc.gnu.org/ml/gcc-patches/1999-09n/msg00862.html
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu
^ 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).