* ANSI C compiler required to build GCC from CVS?
@ 2000-09-17 22:19 Albert Chin-A-Young
2000-09-18 1:35 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Albert Chin-A-Young @ 2000-09-17 22:19 UTC (permalink / raw)
To: gcc
The bundled HP non-ANSI C compiler built GCC 2.95.2 just fine. However, it
doesn't work with GCC from CVS:
cc -c -DIN_GCC -g -DHAVE_CONFIG_H -I. -I../../gcc
-I../../gcc/config -I../../gcc/../include ../../gcc/flow.c
cpp: "stddef.h", line 14: warning 2001: Redefinition of macro offsetof.
cc: "../../gcc/flow.c", line 7358: error 1000: Unexpected symbol: "FILE".
cc: "../../gcc/flow.c", line 7358: error 1705: Function prototypes are an ANSI feature.
cc: "../../gcc/flow.c", line 7358: error 1573: Type of "<<<NULL_SYMBOL>>>" is undefined due to an illegal declaration.
cc: "../../gcc/flow.c", line 7392: warning 563: Argument #2 is not the correct type.
cc: "../../gcc/flow.c", line 7402: error 1000: Unexpected symbol: "FILE".
cc: "../../gcc/flow.c", line 7402: error 1705: Function prototypes are an ANSI feature.
cc: "../../gcc/flow.c", line 7402: error 1573: Type of "<<<NULL_SYMBOL>>>" is undefined due to an illegal declaration.
gmake[2]: *** [flow.o] Error 1
gmake[2]: Leaving directory `/opt/build/gcc-2.96/objdir/gcc'
The offending lines from gcc/flow.c are:
7354: void
7355: flow_loop_dump (loop, file, loop_dump_aux, verbose)
7356: const struct loop *loop;
7357: FILE *file;
7358: void (*loop_dump_aux)(const struct loop *, FILE *, int);
7359: int verbose;
How about changing line 7358 to:
void (*loop_dump_aux)();
7398: void
7399: flow_loops_dump (loops, file, loop_dump_aux, verbose)
7400: const struct loops *loops;
7401: FILE *file;
7402: void (*loop_dump_aux)(const struct loop *, FILE *, int);
7403: int verbose;
How about changing line 7402 to:
void (*loop_dump_aux)();
After applying the above I get:
cc -c -DIN_GCC -g -DHAVE_CONFIG_H -I. -I../../gcc
-I../../gcc/config -I../../gcc/../include ../../gcc/cppinit.c
cc: "../../gcc/cppinit.c", line 408: error 1705: Function prototypes
are an ANSI feature.
The offending line is:
407: void
408: cpp_init (void)
409: {
Line 408 should be:
cpp_init ()
--
albert chin (china@thewrittenword.com)
-- snip snip
--- gcc/flow.c.orig Mon Sep 18 00:17:46 2000
+++ gcc/flow.c Mon Sep 18 00:18:05 2000
@@ -7355,7 +7355,7 @@
flow_loop_dump (loop, file, loop_dump_aux, verbose)
const struct loop *loop;
FILE *file;
- void (*loop_dump_aux)(const struct loop *, FILE *, int);
+ void (*loop_dump_aux)();
int verbose;
{
if (! loop || ! loop->header)
@@ -7399,7 +7399,7 @@
flow_loops_dump (loops, file, loop_dump_aux, verbose)
const struct loops *loops;
FILE *file;
- void (*loop_dump_aux)(const struct loop *, FILE *, int);
+ void (*loop_dump_aux)();
int verbose;
{
int i;
--- gcc/cppinit.c.orig Mon Sep 18 00:17:50 2000
+++ gcc/cppinit.c Mon Sep 18 00:17:56 2000
@@ -405,7 +405,7 @@
static int cpp_init_completed = 0;
void
-cpp_init (void)
+cpp_init ()
{
#ifdef HOST_EBCDIC
/* For non-ASCII hosts, the cl_options array needs to be sorted at
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ANSI C compiler required to build GCC from CVS?
2000-09-17 22:19 ANSI C compiler required to build GCC from CVS? Albert Chin-A-Young
@ 2000-09-18 1:35 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2000-09-18 1:35 UTC (permalink / raw)
To: Albert Chin-A-Young; +Cc: gcc, gcc-patches
On Sep 18, 2000, Albert Chin-A-Young <china@thewrittenword.com> wrote:
> - void (*loop_dump_aux)(const struct loop *, FILE *, int);
> + void (*loop_dump_aux)();
Actually, we have a different way to deal with this problem, so that
we don't miss the prototypes on compilers that support them. I'm
checking this in, under the ``obviously correct'' rule.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-18 1:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-17 22:19 ANSI C compiler required to build GCC from CVS? Albert Chin-A-Young
2000-09-18 1:35 ` Alexandre Oliva
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).