summaryrefslogtreecommitdiffstats
path: root/usr.bin/compile_et
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-03-15 19:05:28 +0000
committerwpaul <wpaul@FreeBSD.org>1995-03-15 19:05:28 +0000
commit9f506b229f9942e4bd90ebd8ad3162f53c843c6e (patch)
tree9c601380728ffa8a30306452d56b8fdf69e6db0c /usr.bin/compile_et
parent0a35f1faf51f2dff3be9c661200b85739b17430d (diff)
downloadFreeBSD-src-9f506b229f9942e4bd90ebd8ad3162f53c843c6e.zip
FreeBSD-src-9f506b229f9942e4bd90ebd8ad3162f53c843c6e.tar.gz
According to stdlib.h, malloc and realloc return void * but error_table.y
declares them to return char *. For some reason, this causes no problems with the old compiler tools, but doing a 'make world' with gcc 2.6.3 in a seperate DESTDIR got me this error: yacc -d /usr/src/usr.bin/compile_et/error_table.y cc -O2 -I. -I/usr/src/usr.bin/compile_et/../../lib/libcom_err -I/mnt/usr/include -c y.tab.c -o error_table.o In file included from /usr/src/usr.bin/compile_et/et_lex.lex.l:11, from /usr/src/usr.bin/compile_et/error_table.y:233: /mnt/usr/include/stdlib.h:100: conflicting types for `malloc' /usr/src/usr.bin/compile_et/error_table.y:80: previous declaration of `malloc' /mnt/usr/include/stdlib.h:104: conflicting types for `realloc' /usr/src/usr.bin/compile_et/error_table.y:80: previous declaration of `realloc' *** Error code 1 Stop. Declaring malloc and realloc to return void * fixes this. It could be that the new gcc is a bit more picky about these things.
Diffstat (limited to 'usr.bin/compile_et')
-rw-r--r--usr.bin/compile_et/error_table.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/compile_et/error_table.y b/usr.bin/compile_et/error_table.y
index 11a8b2d..cb3c0da 100644
--- a/usr.bin/compile_et/error_table.y
+++ b/usr.bin/compile_et/error_table.y
@@ -1,6 +1,7 @@
%{
#include <stdio.h>
-char *str_concat(), *ds(), *quote(), *malloc(), *realloc();
+char *str_concat(), *ds(), *quote();
+void *malloc(), *realloc();
char *current_token = (char *)NULL;
extern char *table_name;
%}
@@ -73,10 +74,10 @@ description : QUOTED_STRING
#ifndef lint
static char const rcsid_error_table_y[] =
- "$Header: error_table.y,v 1.7 89/01/01 07:23:17 raeburn Locked $";
+ "$Header: /home/ncvs/src/usr.bin/compile_et/error_table.y,v 1.2 1995/01/14 22:29:33 wollman Exp $";
#endif
-char *malloc(), *realloc();
+void *malloc(), *realloc();
extern FILE *hfile, *cfile;
static long gensym_n = 0;
OpenPOWER on IntegriCloud