Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0330/6

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


compilers: warn about unreachable code
 [rsc] --rw-rw-r-- M 76409 glenda sys 12233 Mar 30 17:55 sys/src/cmd/cc/cc.h
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/cc.h:475,480 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/cc.h:475,483
	  EXTERN	int	packflg;
	  EXTERN	int	fproundflg;
	  EXTERN	int	profileflg;
	+ EXTERN	int	ncontin;
	+ EXTERN	int	canreach;
	+ EXTERN	int	warnreach;
	  EXTERN	Bits	zbits;
	  
	  extern	char	*onames[], *tnames[], *gnames[];
 [rsc] --rw-rw-r-- M 76409 glenda sys 27003 Mar 30 17:55 sys/src/cmd/cc/dcl.c
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/dcl.c:995,1001 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/dcl.c:995,1000
	  				return 1;
	  		}
	  	}
	- 	return 0;
	  }
	  
	  typedef struct Typetab Typetab;
 [rsc] --rw-rw-r-- M 76409 glenda sys 24189 Mar 30 17:55 sys/src/cmd/cc/lex.c
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/lex.c:1017,1023 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/lex.c:1017,1022
	  		}
	  		c = GETC();
	  	}
	- 	return 0;
	  }
	  
	  void
 [rsc] --rw-rw-r-- M 76409 glenda sys 11731 Mar 30 17:55 sys/src/cmd/cc/macbody
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/macbody:452,457 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/macbody:452,459
	  	cp = s->macro+1;
	  	for(;;) {
	  		c = *cp++;
	+ 		if(c == '\n')
	+ 			c = ' ';
	  		if(c != '#') {
	  			*b++ = c;
	  			if(c == 0)
 [rsc] --rw-rw-r-- M 76409 rsc sys 8927 Mar 30 17:55 sys/src/cmd/cc/pgen.c
	[diffs elided - too long]
	[diff -c /n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/pgen.c /n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/pgen.c]
 [rsc] --rw-rw-r-- M 76409 glenda sys 34268 Mar 30 17:55 sys/src/cmd/cc/sub.c
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/sub.c:9,15 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/sub.c:9,20
	  	n->op = t;
	  	n->left = l;
	  	n->right = r;
	- 	n->lineno = lineno;
	+ 	if(l && t != OGOTO)
	+ 		n->lineno = l->lineno;
	+ 	else if(r)
	+ 		n->lineno = r->lineno;
	+ 	else
	+ 		n->lineno = lineno;
	  	newflag = 1;
	  	return n;
	  }
	/n/sourcesdump/2006/0330/plan9/sys/src/cmd/cc/sub.c:103,109 - 
	/n/sourcesdump/2006/0331/plan9/sys/src/cmd/cc/sub.c:108,114
	  		print(" %T", n->type);
	  	if(n->complex != 0)
	  		print(" (%d)", n->complex);
	- 	print("\n");
	+ 	print(" %L\n", n->lineno);
	  	if(i & 2)
	  		prtree1(n->left, d, 1);
	  	if(i & 1)


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.