Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/15

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Add for libraries.
 [jmk] --rw-rw-r-- M 107020 glenda sys 454 Nov 19 20:52 sys/src/cmd/cc/compat.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/compat.c:40,42 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/compat.c:40,47
	  		memset(v, 0, size);
	  	return v;
	  }
	+ 
	+ void
	+ setmalloctag(void*, ulong)
	+ {
	+ }
 [jmk] --rw-rw-r-- M 107020 glenda sys 26833 Nov 19 20:52 sys/src/cmd/cc/dcl.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:374,382 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:374,381
	  				a = a->left;
	  			}
	  			if(!sametype(t, a->type)) {
	- 				diag(a, "initialization of incompatible pointers: %s",
	- 					s->name);
	- 				print("%T and %T\n", t, a->type);
	+ 				diag(a, "initialization of incompatible pointers: %s\n%T and %T",
	+ 					s->name, t, a->type);
	  			}
	  			if(a->op == OADDR)
	  				a = a->left;
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:1535,1540 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:1534,1540
	  {
	  	Node *p, *r, *q, *m;
	  	long w;
	+ 	Type *zt;
	  
	  	if(debug['i']) {
	  		print("contig v = %ld; s = %s\n", v, s->name);
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:1558,1564 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:1558,1564
	  		stkoff = maxround(stkoff, autoffset);
	  		symadjust(s, n, v - s->offset);
	  	}
	- 	if(w <= 4)
	+ 	if(w <= ewidth[TIND])
	  		goto no;
	  	if(n->op == OAS)
	  		diag(Z, "oops in contig");
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:1572,1581 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:1572,1581
	  		if(n->left->type)
	  		if(n->left->type->width == w)
	  			goto no;
	- 	while(w & 3)
	+ 	while(w & ewidth[TIND])
	  		w++;	/* is this a bug?? */
	  /*
	-  * insert the following code
	+  * insert the following code, where long becomes vlong if pointers are fat
	   *
	  	*(long**)&X = (long*)((char*)X + sizeof(X));
	  	do {
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:1587,1595 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:1587,1597
	  	for(q=n; q->op != ONAME; q=q->left)
	  		;
	  
	+ 	zt = ewidth[TIND] > ewidth[TLONG]? types[TVLONG]: types[TLONG];
	+ 
	  	p = new(ONAME, Z, Z);
	  	*p = *q;
	- 	p->type = typ(TIND, types[TLONG]);
	+ 	p->type = typ(TIND, zt);
	  	p->xoffset = s->offset;
	  
	  	r = new(ONAME, Z, Z);
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/cc/dcl.c:1602,1608 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/cc/dcl.c:1604,1610
	  
	  	m = new(OCONST, Z, Z);
	  	m->vconst = 0;
	- 	m->type = types[TLONG];
	+ 	m->type = zt;
	  
	  	q = new(OAS, q, m);
	  


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.