projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed problem with stab type for initialized static variables,
[unix-history]
/
usr
/
src
/
old
/
dbx
/
c.c
diff --git
a/usr/src/old/dbx/c.c
b/usr/src/old/dbx/c.c
index
140bfa9
..
6463cc7
100644
(file)
--- a/
usr/src/old/dbx/c.c
+++ b/
usr/src/old/dbx/c.c
@@
-1,6
+1,6
@@
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)c.c 1.
4
%G%";
+static char sccsid[] = "@(#)c.c 1.
6
%G%";
/*
* C-dependent symbol routines.
/*
* C-dependent symbol routines.
@@
-47,8
+47,6
@@
public c_init()
/*
* Test if two types are compatible.
/*
* Test if two types are compatible.
- *
- * Integers and reals are not compatible since they cannot always be mixed.
*/
public Boolean c_typematch(type1, type2)
*/
public Boolean c_typematch(type1, type2)
@@
-64,7
+62,7
@@
Symbol type1, type2;
} else {
t1 = rtype(t1);
t2 = rtype(t2);
} else {
t1 = rtype(t1);
t2 = rtype(t2);
- if (t1->type == t_
int or t1->type == t_char
) {
+ if (t1->type == t_
char or t1->type == t_int or t1->type == t_real
) {
tmp = t1;
t1 = t2;
t2 = tmp;
tmp = t1;
t1 = t2;
t2 = tmp;
@@
-76,6
+74,8
@@
Symbol type1, type2;
) or (
isrange(t1, "char") and
(t2->type == t_char or t2->type == t_int)
) or (
isrange(t1, "char") and
(t2->type == t_char or t2->type == t_int)
+ ) or (
+ t1->class == RANGE and isdouble(t1) and t2->type == t_real
) or (
t1->type == t2->type and (
(t1->class == t2->class) or
) or (
t1->type == t2->type and (
(t1->class == t2->class) or
@@
-482,7
+482,6
@@
Symbol s;
break;
case RECORD:
break;
case RECORD:
- case VARNT:
c_printstruct(s);
break;
c_printstruct(s);
break;
@@
-531,8
+530,9
@@
Symbol s;
if (ord(s->class) > ord(TYPEREF)) {
panic("printval: bad class %d", ord(s->class));
}
if (ord(s->class) > ord(TYPEREF)) {
panic("printval: bad class %d", ord(s->class));
}
- error("don't know how to print a %s", c_classname(s));
- /* NOTREACHED */
+ sp -= size(s);
+ printf("<%s>", c_classname(s));
+ break;
}
}
}
}