Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pcc make this compile again
details: https://anonhg.NetBSD.org/src/rev/ca6e011cd26f
branches: trunk
changeset: 327680:ca6e011cd26f
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 14 00:06:52 2014 +0000
description:
make this compile again
diffstat:
external/bsd/pcc/dist/pcc/arch/amd64/local2.c | 4 ++--
external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c | 3 ++-
external/bsd/pcc/dist/pcc/cc/ccom/main.c | 6 ++----
external/bsd/pcc/dist/pcc/cc/ccom/trees.c | 11 +++--------
external/bsd/pcc/dist/pcc/cc/cpp/cpp.c | 14 ++++++--------
external/bsd/pcc/dist/pcc/mip/optim2.c | 5 ++---
external/bsd/pcc/libexec/ccom/Makefile | 4 ++--
7 files changed, 19 insertions(+), 28 deletions(-)
diffs (202 lines):
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/arch/amd64/local2.c
--- a/external/bsd/pcc/dist/pcc/arch/amd64/local2.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/arch/amd64/local2.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: local2.c,v 1.49 2011/09/21 21:23:09 plunky Exp */
-/* $NetBSD: local2.c,v 1.1.1.4 2012/01/11 20:32:40 plunky Exp $ */
+/* $NetBSD: local2.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2008 Michael Shalayeff
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -321,7 +321,7 @@
static void
ldtoul(NODE *p)
{
- int r;
+ int r __unused;
r = getlr(p, '1')->n_rval;
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: gcc_compat.c,v 1.83 2012/03/22 18:04:41 plunky Exp */
-/* $NetBSD: gcc_compat.c,v 1.3 2012/03/26 14:30:46 plunky Exp $ */
+/* $NetBSD: gcc_compat.c,v 1.4 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -551,6 +551,7 @@
return 0;
}
*t = u;
+ __USE(ign);
} else if (strcmp(t, "poison") == 0) {
/* currently ignore */;
} else if (strcmp(t, "visibility") == 0) {
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/cc/ccom/main.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/main.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/main.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: main.c,v 1.118 2012/03/22 18:51:40 plunky Exp */
-/* $NetBSD: main.c,v 1.1.1.5 2012/03/26 14:26:49 plunky Exp $ */
+/* $NetBSD: main.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2002 Anders Magnusson. All rights reserved.
@@ -65,11 +65,9 @@
segvcatch(int a)
{
char buf[1024];
- int dummy;
-
snprintf(buf, sizeof buf, "%sinternal compiler error: %s, line %d\n",
nerrors ? "" : "major ", ftitle, lineno);
- dummy = write(STDERR_FILENO, buf, strlen(buf));
+ (void)write(STDERR_FILENO, buf, strlen(buf));
_exit(1);
}
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/cc/ccom/trees.c
--- a/external/bsd/pcc/dist/pcc/cc/ccom/trees.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/trees.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: trees.c,v 1.306 2012/03/22 18:51:40 plunky Exp */
-/* $NetBSD: trees.c,v 1.1.1.5 2012/03/26 14:26:54 plunky Exp $ */
+/* $NetBSD: trees.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -2430,9 +2430,8 @@
wrualfld(NODE *val, NODE *d, TWORD t, TWORD ct, int off, int fsz)
{
NODE *p, *q, *r, *rn, *s;
- int tsz, ctsz, t2f, inbits;
+ int ctsz, t2f, inbits;
- tsz = (int)tsize(t, 0, 0);
ctsz = (int)tsize(ct, 0, 0);
ct = ENUNSIGN(ct);
@@ -2504,16 +2503,14 @@
static NODE *
rmfldops(NODE *p)
{
- CONSZ msk;
TWORD t, ct;
NODE *q, *r, *t1, *t2, *bt, *t3, *t4;
- int fsz, foff, tsz;
+ int fsz, foff;
if (p->n_op == FLD) {
/* Rewrite a field read operation */
fsz = UPKFSZ(p->n_rval);
foff = UPKFOFF(p->n_rval);
- tsz = (int)tsize(p->n_left->n_type, 0, 0);
q = buildtree(ADDROF, p->n_left, NIL);
ct = t = p->n_type;
@@ -2542,11 +2539,9 @@
fsz = UPKFSZ(q->n_rval);
foff = UPKFOFF(q->n_rval);
t = q->n_left->n_type;
- tsz = (int)tsize(t, 0, 0);
#if TARGET_ENDIAN == TARGET_BE
foff = tsz - fsz - foff;
#endif
- msk = (((1LL << (fsz-1))-1) << 1) | 1;
bt = NULL;
if (p->n_right->n_op != ICON && p->n_right->n_op != NAME) {
t2 = tempnode(0, p->n_right->n_type, 0, 0);
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/cc/cpp/cpp.c
--- a/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: cpp.c,v 1.145 2011/09/27 08:22:55 plunky Exp */
-/* $NetBSD: cpp.c,v 1.1.1.5 2012/01/11 20:33:06 plunky Exp $ */
+/* $NetBSD: cpp.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2004,2010 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -908,7 +908,6 @@
{
usch *t;
usch *sb = stringbuf;
- int dummy;
flbuf();
savch(0);
@@ -916,8 +915,8 @@
t = sheap("%s:%d: warning: ", ifiles->fname, ifiles->lineno);
write (2, t, strlen((char *)t));
}
- dummy = write (2, s, strlen((char *)s));
- dummy = write (2, "\n", 1);
+ (void)write (2, s, strlen((char *)s));
+ (void)write (2, "\n", 1);
stringbuf = sb;
}
@@ -925,16 +924,15 @@
xerror(usch *s)
{
usch *t;
- int dummy;
flbuf();
savch(0);
if (ifiles != NULL) {
t = sheap("%s:%d: error: ", ifiles->fname, ifiles->lineno);
- dummy = write (2, t, strlen((char *)t));
+ (void)write (2, t, strlen((char *)t));
}
- dummy = write (2, s, strlen((char *)s));
- dummy = write (2, "\n", 1);
+ (void)write (2, s, strlen((char *)s));
+ (void)write (2, "\n", 1);
exit(1);
}
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/dist/pcc/mip/optim2.c
--- a/external/bsd/pcc/dist/pcc/mip/optim2.c Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/mip/optim2.c Fri Mar 14 00:06:52 2014 +0000
@@ -1,5 +1,5 @@
/* Id: optim2.c,v 1.82 2011/08/16 06:14:16 ragge Exp */
-/* $NetBSD: optim2.c,v 1.1.1.4 2011/09/01 12:47:14 plunky Exp $ */
+/* $NetBSD: optim2.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson (ragge%ludd.luth.se@localhost).
* All rights reserved.
@@ -1871,12 +1871,11 @@
struct block_map* map ;
unsigned long block_count = count_blocks(p2e);
unsigned long i ;
- unsigned long threads;
struct interpass *front, *back ;
map = tmpalloc(block_count * sizeof(struct block_map));
- threads = map_blocks(p2e, map, block_count) ;
+ (void)map_blocks(p2e, map, block_count) ;
back = map[0].block->last ;
for (i=1; i < block_count; i++) {
diff -r 534a928944df -r ca6e011cd26f external/bsd/pcc/libexec/ccom/Makefile
--- a/external/bsd/pcc/libexec/ccom/Makefile Thu Mar 13 23:48:38 2014 +0000
+++ b/external/bsd/pcc/libexec/ccom/Makefile Fri Mar 14 00:06:52 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/09/01 13:00:14 plunky Exp $
+# $NetBSD: Makefile,v 1.12 2014/03/14 00:06:52 christos Exp $
WARNS?= 2
@@ -32,7 +32,7 @@
DPSRCS= external.c
-MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR}
+MKEXTDIR!= cd ${.CURDIR}/../mkext && ${PRINTOBJDIR}
external.c: ${MKEXTDIR}/mkext
${_MKTARGET_CREATE}
Home |
Main Index |
Thread Index |
Old Index